0

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

  • controllers/(default package)AuthController.groovy
  • domain/(default package)ShiroRole.groovy
  • domain/(default package)ShiroUser.groovy

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!

mjswartz
  • 715
  • 1
  • 6
  • 19

1 Answers1

1

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

Bernhard
  • 444
  • 1
  • 4
  • 19
  • This was kind of a pain, but since my web-app is fairly small currently, I just rebuilt the whole thing with the proper prefix. Trying to do so in the old project gave a lot of errors I couldn't figure out. However, I have it working! Thanks. – mjswartz Jul 16 '15 at 18:20