springboot获取application.yml配置文件属性值
1、application.yml配置文件内容如下:server: port: 7013pathConfig: path: /usr/local/uploadfile/orderCenter/2、示例:获取 pathConfig 下的 path 属性值:@Value("${pathConfig.path}")private String path;通过@Value注解会自动给 pa...
原创
2018-06-27 11:33:40 ·
4341 阅读 ·
1 评论