Home > Back-end >  Springboot @ Value problem
Springboot @ Value problem

Time:09-17

All bosses:

Himself in springboot project using the @ Value annotation, this can be read to the configuration file:
 @ Value (" ${user_source} ") 
Private String userSource;

The colon, so the configuration file are read by value:
 @ Value (" ${user_source:} ") 
Private String userSource;

Do you have a great god met? Thank you!

CodePudding user response:

Add the colon is not be interpreted as the user_source=""

CodePudding user response:

How do I feel what you said is nonsense, grammar has strict rules

CodePudding user response:

The colon to define other values, you mean if you can't find the value of the front with the colon
  • Related