Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Currently, setting properties when using Guice integration is somewhat hacky. We're just binding constants to strings, and hoping that the names match up with method calls. I would prefer something more guicey, that provides us with the typesafety that I tend to expect from Guice.
My thought is to allow methods, similar to the @Provides methods, on the ShiroModule and ShiroWebModule with a @Configures annotation. These methods would then be essentially wrapped in a MembersInjector and setup to be passed a particular object just after its instantiation.
The goal would be to allow something like this in the module:
@Configures
public void configureSessionManager(DefaultWebSessionManager webSessionManager, Cookie cookie)
The DefaultWebSessionManager would be the bean being injected, while the Cookie would simply be treated as an injected dependency, much like the arguments in a @Provides method.