Announcement Announcement Module
No announcement yet.
STS and Spring Security Plug-in Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS and Spring Security Plug-in


    I installed the Spring Security plug-in in my application and then ran the s2-quickstart script.

    After running the script, I noticed two things:
    1- The Login and Logout controllers were not created in the correct package.
    2- Both controllers have compilation errors.

    The compilation errors are related to the imports of Spring Security classes. It seems that STS can not sense that the Spring Security libraries have been added to the project.

    Is this a well known issue? How can I fix it?


  • #2
    The Login and Logout controllers are intentionally in the default package - feel free to move them. Packages in controllers are only used for grouping.

    Are you seeing compilation errors in your IDE or also in the commandline? Grails will resolve the required Spring Security jars using Ivy and cache them in your $HOME/.ivy2/cache folder. Recent versions of STS and IntelliJ (and I assume Netbeans) are aware of the location of plugins and Ivy-cached jars, so you need to configure that. For example in STS you just need to right-click on the project in the Package Explorer tree and select Grails Tools | Refresh Dependencies.


    • #3
      That fixed it. Thanks a lot.