springboot get the value in the configuration file

Reference link: https: //blog.csdn.net/dkbnull/article/details/81953190

 Use @Value comment to read

(When reading the properties configuration file, the default is read application.properties .)

  application.properties:

 

time=6000

  java:

@Value("${time}")
private Integer time;

 

 

 

Guess you like

Origin www.cnblogs.com/cmz-32000/p/11950544.html