小编Dip*_*arg的帖子

将 Spring boot 版本从 2.1.6 迁移到 Spring boot 2.4 时出现以下错误

将我的项目从 Spring boot 版本 2.1.6 迁移到 2.4 时出现以下错误

{*...} 或 ** 模式元素后不允许再有模式数据

发生错误的代码片段

public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authInterceptor)
                .addPathPatterns("/**/test/**")
    }
}
Run Code Online (Sandbox Code Playgroud)

我知道 Spring boot 在 2.4 版本中禁用了 AntPathMatcher ,所以我也尝试了这个选项

Spring.mvc.pathpattern.matching-strategy= ant_path_matcher

但即使这样也行不通

任何帮助深表感谢

java spring spring-boot

17
推荐指数
4
解决办法
3万
查看次数

标签 统计

java ×1

spring ×1

spring-boot ×1