File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
java/ru/mystamps/web/config Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 22
22
import org .springframework .context .annotation .Bean ;
23
23
import org .springframework .context .annotation .Configuration ;
24
24
import org .springframework .context .annotation .Profile ;
25
+ import org .springframework .core .env .Environment ;
25
26
26
27
import ru .mystamps .web .dao .ImageDataDao ;
27
28
import ru .mystamps .web .service .DatabaseImagePersistenceStrategy ;
@@ -50,10 +51,15 @@ public ImagePersistenceStrategy getImagePersistenceStrategy() {
50
51
@ Profile ("prod" )
51
52
class ProdStrategiesConfig implements StrategiesConfig {
52
53
54
+ @ Inject
55
+ private Environment env ;
56
+
53
57
@ Bean
54
58
@ Override
55
59
public ImagePersistenceStrategy getImagePersistenceStrategy () {
56
- return new FilesystemImagePersistenceStrategy ("/data/uploads" );
60
+ return new FilesystemImagePersistenceStrategy (
61
+ env .getRequiredProperty ("app.upload.dir" )
62
+ );
57
63
}
58
64
59
65
}
Original file line number Diff line number Diff line change @@ -39,3 +39,5 @@ liquibase.change-log: classpath:/liquibase/changelog.xml
39
39
logging.file : /data/logs/mystamps.log
40
40
logging.level. : INFO
41
41
logging.level.ru.mystamps : DEBUG
42
+
43
+ app.upload.dir : /data/uploads
You can’t perform that action at this time.
0 commit comments