Created
June 15, 2017 07:33
-
-
Save banterCZ/b6711675c4437fa63f54e169b560fb48 to your computer and use it in GitHub Desktop.
SPeL and propety placeholder using default value
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
/** | |
* Optional property <code>myApp.node-name</code>, hostname otherwise. | |
*/ | |
@Value("#{'${myApp.node-name:}'?:T(java.net.InetAddress).getLocalHost().getHostName()}") | |
private String nodeName; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nečitelný kod se má refaktorovat, takže bych to přepsal do něčeho srozumitelneho