mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-04-02 11:22:40 +08:00
兼容接口多个"/",比如//system/xxx
This commit is contained in:
parent
f1af10d727
commit
e469b0fda0
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user