diff --git a/vote/src/main/java/com/votesystem/ssl/config/MyWebConfiguration.java b/vote/src/main/java/com/votesystem/ssl/config/MyWebConfiguration.java index fb2552a..91e07c5 100644 --- a/vote/src/main/java/com/votesystem/ssl/config/MyWebConfiguration.java +++ b/vote/src/main/java/com/votesystem/ssl/config/MyWebConfiguration.java @@ -18,14 +18,18 @@ public class MyWebConfiguration implements WebMvcConfigurer { .allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE") .allowedHeaders("*") .maxAge(3600); - } @Override + } + + + @Value("${image.save-path}") + private String imagePath; + + @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/api/file/**").addResourceLocations("file:" + imagePath + "/"); // registry.addResourceHandler(imagePath).addResourceLocations("file:" + imagePath + "/"); } - @Value("${image.save-path}") - private String imagePath;