applicationContext.xml配置

spring数据源配置 

 

<bean id="dataSource"
  class="org.apache.commons.dbcp.BasicDataSource"
  destroy-method="close">
  <property name="driverClassName" value="com.mysql.jdbc.Driver" />
  <property name="url"
   value="jdbc:mysql://localhost:3306/sshproject?useUnicode=true&amp;characterEncoding=UTF-8" />
  <property name="username" value="root" />
  <property name="password" value="123456" />
 </bean>

你可能感兴趣的:(spring,xml,mysql,bean,jdbc)