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(imgDir, tmpDir); } }