调整订单模块

This commit is contained in:
2025-11-03 10:15:22 +08:00
parent 720937581f
commit 4f9b9c29a3
11 changed files with 66 additions and 31 deletions

View File

@@ -53,8 +53,10 @@ public class WebAutoConfiguration implements WebMvcConfigurer {
*/
private void configurePathMatch(PathMatchConfigurer configurer, WebProperties.Api api) {
AntPathMatcher antPathMatcher = new AntPathMatcher(".");
configurer.addPathPrefix(api.getPrefix(), clazz -> clazz.isAnnotationPresent(RestController.class)
&& antPathMatcher.match(api.getController(), clazz.getPackage().getName())); // 仅仅匹配 controller 包
configurer.addPathPrefix(api.getPrefix(),
clazz -> clazz.isAnnotationPresent(RestController.class)
&& antPathMatcher.match(api.getController(), clazz.getPackage().getName())
); // 仅仅匹配 controller 包
}
@Bean