xie.kaifeng 8 місяців тому
батько
коміт
1290272c58

+ 1 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/configuration/SecurityConfig.java

@@ -46,7 +46,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                 .antMatchers("/swagger-ui.html",
                         "/swagger-resources/**",
                         "/webjars/**",
-                        "/image/**",
+                        "/uploadFile/**",
                         "/**/api-docs",
                         "/systemmanager/verifyCode",
                         "/common/getCheckSign"

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/configuration/WebConfig.java

@@ -27,7 +27,7 @@ public class WebConfig implements WebMvcConfigurer {
     public void addResourceHandlers(ResourceHandlerRegistry registry) {
         WskhOpenaccountconfig configtype = iWskhOpenaccountconfigMapper.selectOne(new QueryWrapper<WskhOpenaccountconfig>().eq("CONFIGTYPE", 6));
 
-        registry.addResourceHandler("/image/**")
+        registry.addResourceHandler("/uploadFile/**")
                 .addResourceLocations("file:"+configtype.getConfigvalue()+"/uploadFile/");
     }
 
@@ -49,7 +49,7 @@ public class WebConfig implements WebMvcConfigurer {
                         "/common/getCheckSign",
                         "/swagger-resources/**",
                         "/webjars/**",
-                        "/image/**",
+                        "/uploadFile/**",
                         "/**/api-docs");
     }
 

+ 1 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/CommonServiceImpl.java

@@ -168,7 +168,7 @@ public class CommonServiceImpl implements ICommonService {
                     meta.setFileSize(item.getSize() / 1024 + "KB");
                     meta.setFileType(item.getContentType());
 
-                    meta.setFilePath("./image/" + DateTimeUtils.formatChar(new Date(), null) + "/" + fileName);
+                    meta.setFilePath("./uploadFile/" + DateTimeUtils.formatChar(new Date(), null) + "/" + fileName);
                     res.add(meta);
                 }
             }