diff --git a/src/main/java/org/ssssssss/magicboot/configuration/WebConfiguration.java b/src/main/java/org/ssssssss/magicboot/configuration/WebConfiguration.java index d257b64..9f6530a 100644 --- a/src/main/java/org/ssssssss/magicboot/configuration/WebConfiguration.java +++ b/src/main/java/org/ssssssss/magicboot/configuration/WebConfiguration.java @@ -1,8 +1,10 @@ package org.ssssssss.magicboot.configuration; import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.util.UrlPathHelper; import org.ssssssss.magicboot.model.Global; @Configuration @@ -13,4 +15,10 @@ public class WebConfiguration implements WebMvcConfigurer { registry.addResourceHandler(Global.USER_FILES_BASE_URL + "**").addResourceLocations("file:" + Global.getDir() + Global.USER_FILES_BASE_URL); } + // 兼容接口多个"/",比如//system/xxx + @Override + public void configurePathMatch(PathMatchConfigurer configurer) { + configurer.setUrlPathHelper(new UrlPathHelper()); + } + }