【spring boot笔记】4.配置

从配置文件中获取值: @Component @ConfigurationProperties @Validated // 选填 让类成为一个组件,然后通过配置文件获取值 @ConfigurationProperties 默认从全局配置文件中获取值 @Validateded 让属性满足一些条件 参考:http://www.javashuo.com/article/p-ofagjwqz-ty.html
相关文章
相关标签/搜索