@Value注解
 @Value("${mytest.value}")
    String value;在applcation.properties增加配置项
mytest.test: 55555或者application.yml添加
mytest:
  test: 55555也可以初始化对象或者数组
对象
mytest:
  test: 55555
  test1: 34242或者数组
mytest:
-test: 55555
-test1: 34242