【发布时间】:2020-11-12 22:32:58
【问题描述】:
我已经像这样在 Java 类中创建了配置文件,
@Profile(value = "cache")
public class MapCache {
....
}
这些配置文件在使用 spring.profiles.active 时没有被激活,但如果我使用 spring.profiles.include 配置文件工作正常。
我想通过 application.properties 中添加的属性激活配置文件
注意:应用程序在独立的码头实例中运行。
任何提示都会很好。
【问题讨论】:
标签: java spring-boot spring-profiles spring-properties