配制一个applicationContext.XML如下
? xml version = " 1.0 " encoding = " UTF-8 " ?
! DOCTYPE beans PUBLIC " -//SPRING//DTD BEAN//EN " " http://www.springframework.org/dtd/spring-beans.dtd "
beans default - autowire = " autodetect "
import resource = " classpath:conf/spring/demo.xml " /
bean id = " DataSource " class = " org.apache.commons.dbcp.BasicDataSource "
property name = " driverClassName "
value com.mysql.jdbc.Driver / value