这段代码哪里有错误package comxsdzlconfig;import comxsdzlInterceptorLoginInterceptor;import orgspringframeworkbeansfactoryannotationAutowired;import orgspringframeworkcontextannotationConfiguration;import orgsp
这段代码没有明显的错误。但是需要注意的是,继承了WebMvcConfigurationSupport后,会覆盖Spring Boot默认的配置,因此需要手动配置一些内容,如静态资源的路径。同时,需要注意拦截器的添加顺序,以及排除某些不需要拦截的请求。
AI 优化版
原文地址:https://www.cveoy.top/t/topic/bc6G 著作权归作者所有。请勿转载和采集!