The code in jdbc.properties is as follows:
#mysql driver class jdbc.driverClass=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://123.57.9.115:3306/hwyServiceTest?userUnicode=true&characterEncoding=utf8 #database username jdbc.username=root #Database password jdbc.password=root #Maximum number of connection pools jdbc.maxActive=9000 #Connection pool maximum idle jdbc.maxIdle=1000 #Connection pool minimum idle jdbc.minIdle=1 #Initialize connection size jdbc.initialSize=3 #Get the maximum waiting time for the connection jdbc.maxWait=9000 #Used to verify the validity of the database connection jdbc.validationQuery=select 1
The detailed explanation about validationQuery can be viewed:
http://zyx19920203.iteye.com/blog/2300592
The explanation about the url:
The role of JDBC URL can be understood as follows: it is the address used when your JAVA program accesses the database and connects with the specified database. The address information includes the type of the database, the port, and the username and password for logging in to the database.
Different database urls are inconsistent: