@ Value (" 1 ")
Int num.
And
Int num=1;
What is the difference? Or where the meaning of the annotation assignment,
Kneeling for
CodePudding user response:
Family values from the config file, change the data, do not change the codeCodePudding user response:
Springboot project, @ the Value read from the Value of the yml configuration file as aCodePudding user response:
Main or can be read from the configuration data, if the "1" is a special variable, if you are used to more than 1, 100 in your code you are about to change in 100, and reading configuration only need to change the configuration fileCodePudding user response:
Should not like you to use, a configuration class attribute in the configuration file is needed, it is similar to the following this with@ Value (" ${catalog. The name} "))