grailsgroovycontrollershiroggts

(default package) in GGTS


I have a Grails project in GGTS and am authenticating users on an LDAP server with the Shiro security plugin. When I ran grails quick-start-shiro, the script created

Now, if I create some home page controller, it puts it in controllers/<project name>/HomeController.groovy and not controllers/(default package)/HomeController.groovy. What I'm wondering is, how can I create a controller and/or domain and have it be in the same (default package)?

Thanks in advance!


Solution

  • I would not recommend using the default package. I have done this in the beginning of my grails "career" and always had problems, for example when importing a class with default package

    My suggestion is:

    1. delete the domain controller and domain classes generated by the shiro plugin
    2. create them again using the --prefix command as shown in the docs (https://grails.org/plugin/shiro)

    grails shiro-quick-start --prefix=org.example.

    in your case:

    grails shiro-quick-start --prefix