1、domain配置文件--新增如下
//配置数据库和连接池
<jdbc-resource pool-name="szgas_pool" jndi-name="szgas"></jdbc-resource>
<jdbc-connection-pool datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" res-type="javax.sql.DataSource" name="szgas_pool">
<property name="User" value="****"></property>
<property name="AutoReconnectForPools" value="false"></property>
<property name="LoggerClassName" value="com.mysql.jdbc.log.StandardLogger"></property>
<property name="ServerName" value="localhost"></property>
<property name="Port" value="3306"></property>
<property name="DatabaseName" value="****"></property>
<property name="NullNamePatternMatchesAll" value="true"></property>
<property name="AllowPublicKeyRetrieval" value="false"></property>
<property name="Password" value="****"></property>
<property name="AllowLoadLocalInfile" value="true"></property>
<property name="PreparedStatementCacheSqlLimit" value="256"></property>
<property name="Logger" value="com.mysql.jdbc.log.StandardLogger"></property>
<property name="PrepStmtCacheSize" value="25"></property>
<property name="AlwaysSendSetIsolation" value="true"></property>
<property name="ClientCertificateKeyStoreType" value="JKS"></property>
<property name="CallableStmtCacheSize" value="100"></property>
<property name="CapitalizeTypeNames" value="true"></property>
<property name="LocatorFetchBufferSize" value="1048576"></property>
<property name="UseSSL" value="false"></property>
<property name="JdbcCompliantTruncationForReads" value="true"></property>
<property name="TcpRcvBuf" value="0"></property>
<property name="UseSSPSCompatibleTimezoneShift" value="false"></property>
<property name="CacheCallableStatements" value="false"></property>
<property name="DefaultFetchSize" value="0"></property>
<property name="UseCompression" value="false"></property>
<property name="GenerateSimpleParameterMetadata" value="false"></property>
<property name="UseTimezone" value="false"></property>
<property name="GetProceduresReturnsFunctions" value="true"></property>
<property name="DefaultAuthenticationPlugin" value="com.mysql.jdbc.authentication.MysqlNativePasswordPlugin"></property>
<property name="CacheServerConfiguration" value="false"></property>
<property name="AutoDeserialize" value="false"></property>
<property name="MaxRows" value="-1"></property>
<property name="UseLocalTransactionState" value="false"></property>
<property name="SecondsBeforeRetryMaster" value="30"></property>
<property name="ReplicationEnableJMX" value="false"></property>
<property name="UseUnicode" value="true"></property>
<property name="SlowQueryThresholdMillis" value="2000"></property>
<property name="TcpTrafficClass" value="0"></property>
<property name="NetTimeoutForStreamingResults" value="600"></property>
<property name="DynamicCalendars" value="false"></property>
<property name="AllowMasterDownConnections" value="false"></property>
<property name="IncludeThreadNamesAsStatementComment" value="false"></property>
<property name="TcpKeepAlive" value="true"></property>
<property name="NoDatetimeStringSync" value="false"></property>
<property name="EmulateUnsupportedPstmts" value="true"></property>
<property name="NullCatalogMeansCurrent" value="true"></property>
<property name="ExplainSlowQueries" value="false"></property>
<property name="UseStreamLengthsInPrepStmts" value="true"></property>
<property name="ConnectTimeout" value="0"></property>
<property name="EmptyStringsConvertToZero" value="true"></property>
<property name="FailOverReadOnly" value="true"></property>
<property name="MaxQuerySizeToLog" value="2048"></property>
<property name="SocksProxyPort" value="1080"></property>
<property name="IsInteractiveClient" value="false"></property>
<property name="LoadBalanceEnableJMX" value="false"></property>
<property name="DontCheckOnDuplicateKeyUpdateInSQL" value="false"></property>