这是用于在glassfish服务器中添加自定义资源的代码,但我的要求是在wildfly-10服务器中实现此功能,但我不知道该怎么做,因此请帮助我
<custom-resource
factory-class="org.glassfish.resources.custom.factory.PropertiesFactory" res-
type="java.util.Properties" jndi-name="docdokuplm.config">
<property name="codebase" value="http://localhost:9001"></property>
<property name="vaultPath" value="/var/lib/docdoku"></property>
</custom-resource>
<custom-resource
factory-class="org.glassfish.resources.custom.factory.PropertiesFactory" res-
type="java.util.Properties" jndi-name="auth.config">
<property name="basic.header.enabled" value="true"></property>
<property name="session.enabled" value="true"></property>
<property name="jwt.key" value="singh20111995"></property>
<property name="jwt.enabled" value="true"></property>
</custom-resource>
答案 0 :(得分:2)
<subsystem xmlns="urn:jboss:domain:naming:2.0">
<bindings>
<object-factory name="java:/docdokuplm.config" module="net.flexoptix.jbossTools" class="net.flexoptix.jbossTools.PropertiesFactory">
<environment>
<property name="vaultPath" value="/var/lib/docdoku"/>
<property name="codebase" value="http://localhost:8080"/>
</environment>
</object-factory>
您可以添加子系统以在wildfly中添加自定义JNDI。