springboot01-获取自定义配置-@Value注解

1、application.yaml添加如下自定义配置

2、再controller中通过@Value获取配置的值

posted @ 2021-09-10 16:48  不是孩子了  阅读(120)  评论(0)    收藏  举报