存放路径jboss/server/all/deploy/mysql-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:mysql://192.168.1.111:3306/test?useUnicode=true&characterEncoding=utf-8</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>platform</user-name>
<password>platform</password>
<min-pool-size>30</min-pool-size>
<max-pool-size>50</max-pool-size>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
配置文件起名字的时候一定要以-ds结尾入mysq-ds.xml