ele*_*ype 5 java weblogic weblogic12c jakarta-ee
我们是 Weblogic (12c) 的新手。我们尝试根据应用程序运行的环境(dev / staging /prod)选择如何将一些配置传递给应用程序。
我目前正在尝试使用部署计划。在WEB-INF/web.xml,我有:
<context-param>
<param-name>test</param-name>
<param-value>11111</param-value>
</context-param>
Run Code Online (Sandbox Code Playgroud)
plan.xml我在 Weblogic 中为我的应用程序使用了 a 。一些部分 :
<variable-definition>
<variable>
<name>test</name>
<value xsi:nil="false">22222</value>
<description>some description</description>
</variable>
</variable-definition>
Run Code Online (Sandbox Code Playgroud)
和
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
<variable-assignment>
<name>test</name>
<xpath>/web-app/context-param/[param-name="test"]/param-value</xpath>
<origin>planbased</origin>
<operation>replace</operation>
</variable-assignment>
</module-descriptor>
Run Code Online (Sandbox Code Playgroud)
这有效!
但我听说可以从管理控制台更改变量的值,是真的吗?
当我在控制台中(在Deployment Plan选项卡中或在Configuration选项卡中)浏览我的应用程序时,我没有看到任何可以用来更改test变量的字段......我是否遗漏了什么或必须在plan.xml文件本身?
| 归档时间: |
|
| 查看次数: |
1920 次 |
| 最近记录: |