1. Integration Ideas
One,Dao layer: Integrate mybatis and spring
Required jar Packages:
1. MyBatis Jar Package
2. mysql Database driver
3. Database Connection Pool
4, MyBatis and Spring integration package.
5. Spring Jar Package
Configuration file:
1. MyBatis configuration file: Sqlmapconfig.xml
2. Spring configuration file: Applicationcontext-dao.xml
-1. Data source
-2. Database Connection Pool
-3, Configuration sqlsessionfactory (in MyBatis and Spring integration package)
-4. Configure the scanner for the mapper file.
Second, service layer:
Jar Package used: Spring's jar package.
Configuration file: Applicationcontext-service.xml
Configure a package scanner to scan all classes with @service annotations.
Transaction configuration:
Configuration file: Applicationcontext-trans.xml
1. Configure a transaction manager
2. Configure TX
3. Configure Facets
Third, the presentation layer
With SPRINGMVC, you need to use the SPRINGMVC and spring jar packages.
Configuration file: Springmvc.xml
1. Configuring note drivers
2. Configure a view resolver.
3. Packet scanner, @Controller annotations
Xml
1, configure the SPRINGMVC front Controller
2, Spring container initialization of the listener.
SSM Framework Consolidation Summary