|
@ -18,14 +18,18 @@ public class MyWebConfiguration implements WebMvcConfigurer { |
|
|
.allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE") |
|
|
.allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE") |
|
|
.allowedHeaders("*") |
|
|
.allowedHeaders("*") |
|
|
.maxAge(3600); |
|
|
.maxAge(3600); |
|
|
} @Override |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${image.save-path}") |
|
|
|
|
|
private String imagePath; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
|
|
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
|
|
registry.addResourceHandler("/api/file/**").addResourceLocations("file:" + imagePath + "/"); |
|
|
registry.addResourceHandler("/api/file/**").addResourceLocations("file:" + imagePath + "/"); |
|
|
// registry.addResourceHandler(imagePath).addResourceLocations("file:" + imagePath + "/");
|
|
|
// registry.addResourceHandler(imagePath).addResourceLocations("file:" + imagePath + "/");
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Value("${image.save-path}") |
|
|
|
|
|
private String imagePath; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|