-
Notifications
You must be signed in to change notification settings - Fork 208
Closed
Description
According to the documentation of Spring Boot it automaticly configure Spring MVC.
If you want to keep Spring Boot MVC features, and you just want to add additional MVC configuration (interceptors, formatters, view controllers etc.) you can add your own @configuration class of type WebMvcConfigurerAdapter, but without @EnableWebMvc
If we take look at the applicationinsights.web pacakge there is a class called InterceptorRegistry
So it looks like @EnableWebMvc annotation breaks auto configuration feature.
Reproduction :
- Add static content under resource folder
- Add reference to the application insights web package
Expected:
- Spring Boot Autoconfiguration will configure static content for serving
Actual:
- Static content is not served
Additional links:
https://stackoverflow.com/questions/46099116/applicationinsights-breaks-default-spring-boot-configuration-for-static-content