SSM Framework Consolidation Summary

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.