1

I was using Grails 2.0.4 and there was a LoginController in a plugin project that I was using instead of SpringSecurity's Login Controller.

Now I am migration to Grails 2.4.2 and it's not working anymore.

It worked when I put my controller inside of the project, but I'd like to put it back in the plugin project.

Any ideas on how to force it?

Bianca Rosa
  • 197
  • 1
  • 3
  • 10

1 Answers1

1

In your URL mapping you can be explicit about which login controller you are mapping to:

// grails-app/conf/UrlMappings.groovy
class UrlMappings {
    static mappings = {
        '/alphaLogin' {
            controller = 'login'
            plugin = 'alpha'
        }

        '/betaLogin' {
            controller = 'login'
            plugin = 'beta'
        }
    }
}  

Of course you don't have to provide a mapping to both of them. You can just map to the one you want and provide no route to the other.

Jeff Scott Brown
  • 26,804
  • 2
  • 30
  • 47
  • It worked! :) Thanks. I just had two issues: one regarding the plugin name. My plugin in defined as "myplugin" but I had to put it like "myPlugin" in URLMappings. The second one was that I also had to move from default package to another package inside of the application. – Bianca Rosa Jul 16 '14 at 20:25