Application.xml
<!--Scan Package--<context:compent-scan package= "Com.bdqn.exam" ></context:compent-scan><!--Transaction Factory-- ><bean class= "Org.springframework.jdbc.datasource.DataSourceTransactionManagert" id= "Transactionmanagert" > <property name= "dataSource" ref= "DataSource" ></property></bean><!--open transaction Annotations--<TX:A nnotation-driven/><!--Open the MVC annotations--><MVC:ANNOTATION-DRIVEN/><--JDBC data source configuration factory--><bean> <property name= "Driverclass" value= "Com.mysql.jdbc.driver" > <property name= "User" value= "root" > <prop Erty name= "password" value= "123" > <property name= "jdbcurl" value= "Jdbc:mysql:///exam?characterencoding=utf-8" ></bean><!--MyBatis Factory--><bean class= "Org.mybatis.spring.SqlSessionFactoryBean" id= " Sqlsessionfactory "> <property name=" dataSource "value=" DataSource "></property></bean><!-- Help class factory--><bean class= "Org.mybatis.spring.mapper.MapperScannerConfigurEr "> <property name=" sqlsessionfactorybeanname "value=" sqlsessionfactory "> <property name=" Basepackage " Value= "Com.bdqn.exam.dao" ></bean>
Spring application.xml Configuration and Web. XML configuration