{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4154","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4154/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4154/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4154/events","html_url":"https://github.com/spring-projects/spring-boot/issues/4154","id":111028819,"number":4154,"title":"Strage behaviour in DelegatingWebMvcConfiguration with 1.3.0.M5","user":{"login":"benneq","id":1627305,"avatar_url":"https://avatars.githubusercontent.com/u/1627305?v=3","gravatar_id":"","url":"https://api.github.com/users/benneq","html_url":"https://github.com/benneq","followers_url":"https://api.github.com/users/benneq/followers","following_url":"https://api.github.com/users/benneq/following{/other_user}","gists_url":"https://api.github.com/users/benneq/gists{/gist_id}","starred_url":"https://api.github.com/users/benneq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benneq/subscriptions","organizations_url":"https://api.github.com/users/benneq/orgs","repos_url":"https://api.github.com/users/benneq/repos","events_url":"https://api.github.com/users/benneq/events{/privacy}","received_events_url":"https://api.github.com/users/benneq/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/waiting-for-feedback","name":"waiting-for-feedback","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-12T18:26:19Z","updated_at":"2015-10-13T04:40:20Z","closed_at":null,"body":"Hi, I've got a strange problem with `DelegatingWebMvcConfiguration`:\r\n\r\nWhen I start our project without Spring Security ( `@SpringBootApplication(exclude=org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class)` ), everything is normal.\r\nBut when I enable Spring Security (by removing the exclude), I figured out, that `DelegatingWebMvcConfiguration`'s  `@Autowired(required = false) public void setConfigurers(List<WebMvcConfigurer> configurers)` method is getting called AFTER its `protected void addFormatters(FormatterRegistry registry)` method.\r\n\r\nI can't figure out why this is happening. I tried to setup an extremely small test project, but there everything works as expected. I thought that `@Autowired setters` get called immediately after the constructor and before any other method can be invoked?\r\n\r\nThanks for your help."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/147599679","html_url":"https://github.com/spring-projects/spring-boot/issues/4154#issuecomment-147599679","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4154","id":147599679,"user":{"login":"benneq","id":1627305,"avatar_url":"https://avatars.githubusercontent.com/u/1627305?v=3","gravatar_id":"","url":"https://api.github.com/users/benneq","html_url":"https://github.com/benneq","followers_url":"https://api.github.com/users/benneq/followers","following_url":"https://api.github.com/users/benneq/following{/other_user}","gists_url":"https://api.github.com/users/benneq/gists{/gist_id}","starred_url":"https://api.github.com/users/benneq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benneq/subscriptions","organizations_url":"https://api.github.com/users/benneq/orgs","repos_url":"https://api.github.com/users/benneq/repos","events_url":"https://api.github.com/users/benneq/events{/privacy}","received_events_url":"https://api.github.com/users/benneq/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T04:40:20Z","updated_at":"2015-10-13T04:40:20Z","body":"Thanks for the hint. I now tried 1.2.6.RELEASE (with default spring.version 4.1.7 and with spring.version 4.2.1) and I get exactly the same behavior: frist `addFormatters`, then `setConfigurers`.\r\n\r\nI already got breakpoints in both methods, but there's some `EnhancerBySpringCGLIB` magic going on, and I can't really tell what's going on, because Eclipse can't open those files.\r\n\r\nI now just ran the not-working version with Boot 1.3.0.M5 and here is what I could copy from Eclipse debugger:\r\n1. call to `setFormatters`: http://pastebin.com/4MXnYwdf\r\n2. call to `setConfigurers`: http://pastebin.com/tG7CsHJM\r\n\r\nIf I can give you any better information, please tell me. Sadly I can't share the project. If you can't get any useful information from the Stacks, I think I'm gonna remove classes one by one till it's working as expected, and then should be able to share a stripped down project that shows the misbehavior."}}