Languages
[Edit]
EN

Spring @Value annotation default value

5 points
Created by:
Abel-Burks
458

Example:

@Value("${my.properties:my default string value}")
private String myStringConfig;

@Value("${my.properties:true}")
private boolean myBooleanConfig;

@Value("${my.properties:123}")
private int myIntConfig;

 

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join