diff options
author | Vitaly Takmazov | 2018-04-11 14:05:43 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-11 14:05:43 +0300 |
commit | f7a2f1440ef0c13a472b1b815186615d2c54168a (patch) | |
tree | 2270b2bd9948cdb809e40942b63cf4c84172a53a /juick-common/src/main/java/com/juick/server/configuration | |
parent | 6f346454e906d07551c35a7173fd8175b4d0975d (diff) |
server: ImagesService refactoring
Diffstat (limited to 'juick-common/src/main/java/com/juick/server/configuration')
-rw-r--r-- | juick-common/src/main/java/com/juick/server/configuration/StorageConfiguration.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/juick-common/src/main/java/com/juick/server/configuration/StorageConfiguration.java b/juick-common/src/main/java/com/juick/server/configuration/StorageConfiguration.java index 94b23037..4101f37d 100644 --- a/juick-common/src/main/java/com/juick/server/configuration/StorageConfiguration.java +++ b/juick-common/src/main/java/com/juick/server/configuration/StorageConfiguration.java @@ -2,13 +2,19 @@ package com.juick.server.configuration; import com.juick.service.ImagesService; import com.juick.service.ImagesServiceImpl; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class StorageConfiguration { + + @Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}") + private String tmpDir; + @Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}") + private String imgDir; @Bean public ImagesService imagesService() { - return new ImagesServiceImpl(); + return new ImagesServiceImpl(imgDir, tmpDir); } } |