简体   繁体   English

外部配置

[英]External Configuration

I have large project that downloads its configuration from an external source. 我有一个大型项目,可以从外部源下载其配置。 and the refers to them with @value annotation with their specified name. ,并使用指定名称的@value注释引用它们。 My question can I some how print all these external configurations is it possible. 我的问题是可以打印所有这些外部配置吗?

If you inject org.springframework.core.env.Environment you can get all the defined configuration properties. 如果注入org.springframework.core.env.Environment ,则可以获取所有已定义的配置属性。 Check out Spring: access all Environment properties as a Map or Properties object for additional info. 检出Spring:以Map或Properties对象的形式访问所有Environment属性,以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM