1
我想通過使用XSLT在system-properties.xml中添加屬性。xslt將文本添加到jboss屬性中-service.xml
當前XML文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<server>
<mbean code="org.jboss.varia.property.PropertyEditorManagerService"
name="jboss:type=Service,name=PropertyEditorManager">
</mbean>
<mbean code="org.jboss.varia.property.SystemPropertiesService"
name="jboss:type=Service,name=SystemProperties">
<attribute name="Properties">
my.project.property=This is the value of my property
</attribute>
</mbean>
</server>
我要添加屬性名稱= 「屬性」 裏面一個新的屬性。
結果:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<server>
<mbean code="org.jboss.varia.property.PropertyEditorManagerService"
name="jboss:type=Service,name=PropertyEditorManager">
</mbean>
<mbean code="org.jboss.varia.property.SystemPropertiesService"
name="jboss:type=Service,name=SystemProperties">
<attribute name="Properties">
my.project.property=This is the value of my property
my.project.anotherProperty=This is the value of my other property
</attribute>
</mbean>
</server>
感謝。
好問題,+1。查看我的答案,獲取完整,簡短的解決方案。 –