【发布时间】:2018-07-27 21:46:22
【问题描述】:
有很多关于如何使用 @ConfigurationProperties 和 @PropertySource 的示例,其中配置位于 .properties 或 .yml 文件中。如何更改代码以便它使用配置服务器?我的代码目前可以在每个变量上使用 @Value 正常工作,但在切换到类上的 @ConfigurationProperties 时不能正常工作。
【问题讨论】:
标签: java spring-boot configuration