aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/server/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-11 14:05:43 +0300
committerGravatar Vitaly Takmazov2018-04-11 14:05:43 +0300
commitf7a2f1440ef0c13a472b1b815186615d2c54168a (patch)
tree2270b2bd9948cdb809e40942b63cf4c84172a53a /juick-common/src/main/java/com/juick/server/configuration
parent6f346454e906d07551c35a7173fd8175b4d0975d (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.java8
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);
}
}