From a3ec3587e1fa33e4e08da9783d9d66c55ac84550 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Nov 2018 16:37:42 +0300 Subject: avatar public url --- .../java/com/juick/server/configuration/WwwAppConfiguration.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/juick/server/configuration') diff --git a/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java b/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java index 2286165d..93fe7282 100644 --- a/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java +++ b/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java @@ -58,8 +58,8 @@ public class WwwAppConfiguration implements WebMvcConfigurer { private UserService userService; @Inject private TagService tagService; - @Value("${avatars_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}") - private String avatarsPath; + @Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}") + private String imgDir; @Bean public CaffeineCacheManager cacheManager() { return new CaffeineCacheManager("help"); @@ -131,7 +131,7 @@ public class WwwAppConfiguration implements WebMvcConfigurer { try { registry .addResourceHandler("/**", "/i/a/**") - .addResourceLocations("classpath:/static/", Paths.get(avatarsPath, "/a/").toUri().toURL().toString()) + .addResourceLocations("classpath:/static/", Paths.get(imgDir, "/a/").toUri().toURL().toString()) .setCacheControl(CacheControl.maxAge(365, TimeUnit.DAYS)) .resourceChain(false) .addResolver(new VersionResourceResolver().addContentVersionStrategy("/**", "/i/a/**")); -- cgit v1.2.3