style标签

This commit is contained in:
wujj 2020-10-19 10:09:50 +08:00
parent ce583df4c3
commit ae907965f9
1 changed files with 4 additions and 1 deletions

View File

@ -45,6 +45,9 @@ public class WebConfig implements WebMvcConfigurer {
*/
@Value("${ms.upload.path}")
private String uploadFloderPath;
@Value("${ms.upload.template}")
private String template;
/**
* 上传路径映射
*/
@ -69,7 +72,7 @@ public class WebConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/upload/**").addResourceLocations("/upload/","file:upload/");
registry.addResourceHandler("/templets/**").addResourceLocations("/templets/","file:templets/");
registry.addResourceHandler("/templets/**").addResourceLocations(File.separator+template+File.separator,"file:"+template+File.separator);
registry.addResourceHandler("/html/**").addResourceLocations("/html/","file:html/");
//三种映射方式 webapp下当前目录下jar内
registry.addResourceHandler("/app/**").addResourceLocations("/app/","file:app/", "classpath:/app/");