diff options
author | Vitaly Takmazov | 2018-11-20 16:37:42 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-11-20 16:37:42 +0300 |
commit | a3ec3587e1fa33e4e08da9783d9d66c55ac84550 (patch) | |
tree | 9311de2f6511421eefed3e2e10bc821d2179dbd4 /src/main/java/com/juick/server/configuration | |
parent | d2b04d9b719b79a35e90b1c5569722ba5cbf794b (diff) |
avatar public url
Diffstat (limited to 'src/main/java/com/juick/server/configuration')
-rw-r--r-- | src/main/java/com/juick/server/configuration/WwwAppConfiguration.java | 6 |
1 files changed, 3 insertions, 3 deletions
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/**")); |