org.apache.commons.dbcp.SQLNestedException:无法创建 PoolableConnectionFactory(连接属性“autoReconnect”只接受以下形式的值:“true”、“false”、“yes”或“no”。值“true;connectTimeout= 360000;socketTimeout=360000' 不在这个集合中。)
&
is a special character in XML and needs to be escaped as &
. Try the following configuration:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/db?autoReconnect=true&connectTimeout=360000&socketTimeout=360000" />
<property name="username" value="root" />
<property name="password" value="mysql" />
<property name="initialSize" value="5" />
<property name="maxActive" value="10" />
</bean>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.