-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
We are in the process of switching a regular spring application over to spring-boot, but we hit a small problem while transfering to spring-boot.
We have defined a Custom RequestDataValueProcessor which is being overriden by spring-security.
In our own application, before using spring-boot, we were able to overcome this problem by defining this bean in a different location. The problem we are facing now is that spring-boot executes certain configurations at a later time, which makes it impossible for us to override the behaviour again.
In our console log we see a message like this:
2015-12-04 10:49:28.120 INFO 7584 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'requestDataValueProcessor' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=demoApplication; factoryMethodName=requestDataValueProcessor; initMethodName=null; destroyMethodName=(inferred); defined in com.example.DemoApplication] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration; factoryMethodName=requestDataValueProcessor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebMvcSecurityConfiguration.class]]
I have added a simple demo application where you can see this behaviour.
The href on the anchor(a) tag on the index page should contain "OVERRIDEN ACTION" instead of the default "/" that was defined in the page itself.
For this example spring-security is enabled, the username="user", the password is generated in the console.