It is possible to override a plugin's Controller from another plugin?
Posted
by
fabschu
on Stack Overflow
See other posts from Stack Overflow
or by fabschu
Published on 2012-08-29T08:26:54Z
Indexed on
2012/09/14
15:38 UTC
Read the original article
Hit count: 551
I'm developing a plugin (MyPlugin) which combines some security functions to use it as a standard plugin for my next Grails application. It integrates the Spring-Security-Core
and Spring-Security-UI
plugins, and by its installation all dependencies should be installed automatically by adding the dependencies in the BuildConfig
like: plugins { compile: ...}
So far everything works fine, but in MyPlugin I'm changing the behaviour of the Spring-Security-UI
plugin (password encoding in User Domain), by overwriting the UserController
. Executing MyPlugin leads to the expected behaviour and new Users are created using the correct Controller.
However, when installing MyPlugin in another Grails application, this behaviour fails and the original UserController
of the Spring-Security-Ui
plugin is used.
I tried to solve this by configuring the dependsOn
and loadAfter
properties in the GrailsPlugin
file, but without any success.
Is it possible to fix this? Or is it only possible to overwrite behaviour/controllers in the main application?
© Stack Overflow or respective owner