Jboss 数据源模板
我在Wildfly 10的standalone.xml文件中有几十个数据源,如下例所示 除了连接URL和用户名/密码之外,它们都共享相同的详细信息 有没有办法定义一个“模板”以避免重复所有公共配置?Jboss 数据源模板,jboss,datasource,wildfly,Jboss,Datasource,Wildfly,我在Wildfly 10的standalone.xml文件中有几十个数据源,如下例所示 除了连接URL和用户名/密码之外,它们都共享相同的详细信息 有没有办法定义一个“模板”以避免重复所有公共配置? <datasource jta="true" jndi-name="java:jboss/datasources/my-db" pool-name="my-db"> <connection-url>jdbc:postgresql://localhost/my-db&l
<datasource jta="true" jndi-name="java:jboss/datasources/my-db" pool-name="my-db">
<connection-url>jdbc:postgresql://localhost/my-db</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>postgresql-9.4-1206-jdbc42.jar</driver>
<security>
<user-name>xxxxx</user-name>
<password>xxxxx</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/>
<validate-on-match>true</validate-on-match>
<background-validation>false</background-validation>
<stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLStaleConnectionChecker"/>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
jdbc:postgresql://localhost/my-db
org.postgresql.Driver
postgresql-9.4-1206-jdbc42.jar
xxxxx
xxxxx
真的
假的
假的