The first section MYBATIS3+SPRINGMVC4+SPRING4 environment construction

Source: Internet
Author: User

First step : Find the jar package

AOP3, upload a file 2,Spring relies on commons-logging1, date conversion Tool class 1, Connection pool 1, JSON data processing 3,jstl expression 2,log4j, Mybatis Core Pack 2, database connection 1,Spring19,mybatis-spring1


Step Two: Accessories MyBatis's core configuration file


Com.hanpang is not the package name, it corresponds to the namespace of your map file.

Step two : Configure The core configuration file for Spring MVC


SpringMVC Configuration, no interceptor configuration

Step three : Configure 2 filters on Spring MVC

1. Solve The Chinese garbled problem of Post request

2. Resolving filters that use requests such as PUT/delete


Fourth Step : Configure Spring's core configuration file

1.beans.xml


2. Configuring listeners


Fifth edition Spring and Mybatis for consolidation

a jar package that requires my batis-spring, integrated with

1. Connect to database Information


Create MyBatis for Sqlsessionfactory and automatic instantiation interface implementation classes,Beans.xml under Spring and mybatis rights Assignment, Variable name The first letter of the name of my interface lowercase


Configure Transaction Manager


The first section MYBATIS3+SPRINGMVC4+SPRING4 environment construction

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.