如果在springboot的启动类上,添加@EnableWebMvc,那么它就会间接地让WebMvcConfigurationSupport起作用,而WebMvcConfigurationSupport会让WebMvcAutoConfiguration失效,所有关于SpringMvc的配置都是写在WebMvcAutoConfiguration里面的,既然它不起作用了,那么SpringMvc自然也就没有了。
详细参考原文链接:https://blog.csdn.net/weixin_42371679/article/details/111890353
原文瞎说的,你试试,加不加一个效果,只能说可以不加。
Sign in to make a reply
錯別∕"字
如果在springboot的启动类上,添加@EnableWebMvc,那么它就会间接地让WebMvcConfigurationSupport起作用,而WebMvcConfigurationSupport会让WebMvcAutoConfiguration失效,所有关于SpringMvc的配置都是写在WebMvcAutoConfiguration里面的,既然它不起作用了,那么SpringMvc自然也就没有了。
详细参考原文链接:https://blog.csdn.net/weixin_42371679/article/details/111890353