将我的项目从 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
但即使这样也行不通
任何帮助深表感谢