Created
October 24, 2017 09:43
-
-
Save loomismilitia/42b7ce9029e0b6d9a0a2cfb74491c250 to your computer and use it in GitHub Desktop.
Spring Boot - Expression Driven Dependency Injection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# reuse application properties | |
file.root.folder = c:\\files\\ | |
file.pictures.folder = ${file.root.folder}pictures\\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExpressionDrivenDependencyInjection { | |
@Value("${file.root.folder}") | |
private String rootFolder; | |
@Value("${file.pictures.folder}") | |
private String picturesFolder; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment