-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AI Interceptor overwrite default configuration of Spring MVC #422
Comments
@mkaszub I totally agree with the documentation part that we should not use cc: @gavlyukovskiy we should look at this too before making we finalize starter. Apologies for getting so late in the game here @mkaszub |
I didn't use this class in the starter itself, it won't be applied unless user explicitly imports Although inside the starter we can auto-configure @mkaszub did you explicitly import this class? |
@gavlyukovskiy I don't think that @mkaszub used starter. This issue I believe was present way before we started working on starter. I think it is a part of web jar. I haven't verified this on my own, but I suspect based on the documentation it would break spring auto config. Also I think the same functionality is well achieved by the filter, I really did not found a specific use case of this |
I understood that starter was not used, I mean spring boot will not include this configuration by default and fact of existing of this configuration won't cause any conflicts unless it was explicitly imported by user in their application. Probably you have somewhere tutorial that asks to import this configuration? If so it will, obviously, break auto-configuration. |
I see I thought that this would by having the tag |
@mkaszub we have removed the |
According to the documentation of Spring Boot it automaticly configure Spring MVC.
If we take look at the applicationinsights.web pacakge there is a class called InterceptorRegistry
https://github.com/Microsoft/ApplicationInsights-Java/blob/420ace24b444a6da61110fcbec7c98e1a3a63c73/web/src/main/java/com/microsoft/applicationinsights/web/spring/internal/InterceptorRegistry.java#L33
So it looks like @EnableWebMvc annotation breaks auto configuration feature.
Reproduction :
Expected:
Actual:
Additional links:
https://stackoverflow.com/questions/46099116/applicationinsights-breaks-default-spring-boot-configuration-for-static-content
The text was updated successfully, but these errors were encountered: