我想知道是否有任何类似于 Apache Aries Blueprint 的 Spring Profiles 的东西。在将蓝图文件部署到 Apache Karaf 容器时,我试图有条件地加载内容,但我仍然没有弄清楚如何去做。
将蓝图 XML 文件分成两部分对我来说不是一个可接受的解决方案,但也许还有其他我不知道的解决方案可以做到这一点。
谢谢!
我想知道是否有任何类似于 Apache Aries Blueprint 的 Spring Profiles 的东西。在将蓝图文件部署到 Apache Karaf 容器时,我试图有条件地加载内容,但我仍然没有弄清楚如何去做。
将蓝图 XML 文件分成两部分对我来说不是一个可接受的解决方案,但也许还有其他我不知道的解决方案可以做到这一点。
谢谢!
If you need something like profile within one bundle bounds it is signal that something wrong is happening. In pure modular environment you should not need things like that, because service model keeps you customizations hidden. In traditional JEE applications where your WAR is one big assembly you may not have different options.
You have two options here. First - which you don't like to apply - is to drop additional blueprint file in deploy folder or have additional bundle. Second is to use "blueprint-ext" namespace which allows you to load resource from disk location.