In the deployment of the project to find two problems, the first problem is not too easy to find, because I deploy the time is not a problem, but the product's colleagues in the run process is always a connetexception abnormal look at a long time did not find what problems to check the internet for a bit It's a msql connection. The second problem is that the database on your side is automatically disconnected for a period of time. Check the data is the DBCP connection to MySQL when the problem is actually two problems is a problem I configured a bit of these days did not report such a mistake! Sort of solved it!
<bean id= "DataSource" class= " Org.apache.commons.dbcp.BasicDataSource " destroy-method=" Close " > <property name= "DriverClassName" value= "${ Driverclass} " /> <property name=" url " Value= "${jdbcurl}" /> <property name= "username" value= "${user}" /> <property name= " Password " value=" ${password} " /> <property name= "InitialSize" value= "Max"/> <property name= "maxactive" value= "/> <!-- removeabandoned: whether to automatically reclaim timeout connections--> &nbSp; <property name= "removeabandoned" value= " True "/> <!--removeabandonedtimeout: Time-out ( in seconds)--> <property name= " Removeabandonedtimeout " value="/> <!-- 1000 * 60 * 30 connections remain idle in the pool without being idle connection to the collector thread--> <property name= "Minevictableidletimemillis" value= "/> " <property name= "Validationquery" value= "Select now () from dual "/> <!-- <property name= "AutoReConnect" value= "true"/> &nBsp; <property name= "removeabandoned" value= "true"/> <property name= "Removeabandonedtimeout" value= "/> " <property name= "logabandoned" value= "true"/> --> </bean>