我有一个maven作为构建工具的应用程序.
我正在使用maven配置文件来设置不同配置文件的不同属性.
我想要做的是maven中的所有活动配置文件也将被移植到spring active配置文件中,所以我可以在bean signature(@profile)中引用它们.但我不知道该怎么做.
例如:考虑以下maven设置
<profiles>
<profile>
<id>profile1</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
</properties>
</profile>
<profile>
<id>profile2</id>
<properties>
</properties>
</profile>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
</properties>
</profile>
<profile>
<id>production</id>
<properties>
</properties>
</profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)
假设我运行maven而没有指定我希望Spring拥有的任何其他配置文件profile1以及 development作为活动配置文件.