Category "grails"

Why does the @Override annotation not work when building a Grails project?

I'm using the Grails 2.3.8 build system to build my Grails project (i.e., the default system built on top of Gant). When I annotate my methods with @java.lang.

How to catch exceptions in grails REST controllers

If you use a controller to implement rest APIs, you want to deal with any exception thrown and return a generic or specific well formed REST response. We can't

Bug in Grails / Spring Security when using user groups and roles - can't authenticate

I think I have found a bug in Grails Spring Security 3.1.1, and latest Grails 3.2.6. I have installed the Spring Security plugin. From the command line console

Why can't Groovy find this program even though it's on my PATH?

tl;dr: Groovy cannot find a program (phantomjs, which is on my $PATH) when I attempt to execute the shell command from a class -- it's otherwise finds it just f

Trouble getting Conditional CSS with Media Query and Grails

I'm using media queries to import the correct stylesheet (mobile.css or main.css) in my Grails application. If I load the page with my PC, it works fine, when i

How to change grails localhost port?

I'm using grails 2.0.4. And I want to use port:8090 instead of 8080 for localhost. So need help to change the port to 8090 permanently.

Calling Hibernate in background threads in grails

I am trying to create a specific type of background processing setup in a grails application. A fixed size thread pool exists only for the duration of the batc

Posting a File and Associated Data to a RESTful WebService preferably as JSON

In an application I am developing RESTful API and we want the client to send data as JSON. Part of this application requires the client to upload a file (usuall

How to return 404 for pages that do not exist when using Grails Spring Security Plugin

I'm using Grails 3.3.9 with the spring security core plugin 3.2.3 to secure a website. The problem I have is that now users receive a 403 for pages that do not