如何在Seam中创建用于调试/开发的components.xml
有没有人创建了两个版本的 components.xml
,例如 components-dev.properties
或其他 dev
或 prod
版本?
你是怎么做到的?
我们有一些用于开发的自定义组件,这些组件是在 components.xml
中创建的,我想将其移至其自己的 components-dev.xml
但我不这样做不知道该怎么做。有什么想法吗?
我想要移动的代码通常是这样的:
<component name="fooBar" class="org.bar.FooBar" />
Has anyone created two versions of components.xml
like the components-dev.properties
or the other dev
or prod
versions?
How did you do this?
We have some custom components that we are using for Development that is created in components.xml
that I would like to move to its own components-dev.xml
but I don't how to do this. Any ideas?
The codes that I would like to move are generally like this:
<component name="fooBar" class="org.bar.FooBar" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以有条件地安装这样的组件:
如果您有很多需要有条件地安装的组件,并且您不想在转移到生产环境时切换所有组件,则可以使用 Components.properties 文件中的条目。例如:
Components.properties
Components.xml
现在您只需要更改 dev 属性。
You can conditionally install a component like this:
If you have a lot of components that need to be conditionally installed and you don't want to switch all of them when moving to production, you can use an entry in the components.properties file. For example:
components.properties
components.xml
Now you just need to change the dev attribute.