如何解决解决@PropertySource占位符springboot
我有一个带有占位符@PropertySource
的代码:
@Configuration
@Import({ DataSourceConfig.class })
@PropertySource(value = "event-sql-${placeholder:oracle}.xml")
public class AuditEventRepositoryConfig {
我想使用{placeholder}
来加载不同的xml,例如event-sql-azure.xml
。我该如何实现?
说明:
Any ${...} placeholders present in a @PropertySource resource location will be resolved against the set of property sources already registered against the environment.
但是,我不确定已针对该环境注册的一组财产来源是什么意思。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。