{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4236","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4236/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4236/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4236/events","html_url":"https://github.com/spring-projects/spring-boot/issues/4236","id":112187499,"number":4236,"title":"Spring AOP breaks whitelabel mvc binding ","user":{"login":"peterdnight","id":2165498,"avatar_url":"https://avatars.githubusercontent.com/u/2165498?v=3","gravatar_id":"","url":"https://api.github.com/users/peterdnight","html_url":"https://github.com/peterdnight","followers_url":"https://api.github.com/users/peterdnight/followers","following_url":"https://api.github.com/users/peterdnight/following{/other_user}","gists_url":"https://api.github.com/users/peterdnight/gists{/gist_id}","starred_url":"https://api.github.com/users/peterdnight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterdnight/subscriptions","organizations_url":"https://api.github.com/users/peterdnight/orgs","repos_url":"https://api.github.com/users/peterdnight/repos","events_url":"https://api.github.com/users/peterdnight/events{/privacy}","received_events_url":"https://api.github.com/users/peterdnight/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-19T16:54:13Z","updated_at":"2015-10-20T04:44:38Z","closed_at":null,"body":"Setup - latest 1.3 snapshot, with actuator and web starters.\r\n\r\nAdding a AOP expression causes the mvc bindings for `/error` to not get mapped. eg. if you uncomment  the `@Aspect`, you will see the correct mapping registration in logs:\r\n\r\n```\r\n    2015-10-19 12:44:38.619  INFO 10472 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped \"{[/error]}\" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)\r\n    2015-10-19 12:44:38.619  INFO 10472 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped \"{[/error],produces=[text/html]}\" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)\r\n```\r\n\r\nCode snippet - try with and without @aspect commented.\r\n\r\n```java\r\n    @SpringBootApplication\r\n    public class Z4Application {\r\n\r\n    public static void main(String[] args) {\r\n        SpringApplication.run(Z4Application.class, args);\r\n    }\r\n    \r\n\t@Configuration\r\n\t// @Aspect\r\n\tpublic static class Default_Collection {\r\n\t\t\r\n\t\t@Pointcut(\"within(@org.springframework.stereotype.Controller *)\")\r\n\t\tprivate void mvcPC() {\r\n\t\t};\r\n\r\n\t\t@Around(\"mvcPC()\")\r\n\t\tpublic Object mvcAdvice(ProceedingJoinPoint pjp)\r\n\t\t\t\tthrows Throwable {\r\n\r\n\t\t\tSystem.out.println( \"got here\" );\r\n\r\n\t\t\treturn \"Breaks Err\";\r\n\t\t}\r\n\t}\r\n\t\r\n```"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/149430423","html_url":"https://github.com/spring-projects/spring-boot/issues/4236#issuecomment-149430423","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4236","id":149430423,"user":{"login":"philwebb","id":519772,"avatar_url":"https://avatars.githubusercontent.com/u/519772?v=3","gravatar_id":"","url":"https://api.github.com/users/philwebb","html_url":"https://github.com/philwebb","followers_url":"https://api.github.com/users/philwebb/followers","following_url":"https://api.github.com/users/philwebb/following{/other_user}","gists_url":"https://api.github.com/users/philwebb/gists{/gist_id}","starred_url":"https://api.github.com/users/philwebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwebb/subscriptions","organizations_url":"https://api.github.com/users/philwebb/orgs","repos_url":"https://api.github.com/users/philwebb/repos","events_url":"https://api.github.com/users/philwebb/events{/privacy}","received_events_url":"https://api.github.com/users/philwebb/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T04:44:38Z","updated_at":"2015-10-20T04:44:38Z","body":"@dsyer @snicoll @wilkinsona I wonder if we shouldn't switch the default in 1.3 to `proxy-target-class=true`? It would seem like a more sensible default to me."}}