Build an SSM framework (aggregation project) and an ssm framework Aggregation

Source: Internet
Author: User

Build an SSM framework (aggregation project) and an ssm framework Aggregation

Parents Parent Project pom
Base user permission jar wms business jar app helps manage war
1. the pom. xml file of parents
1.1 maven servlet3.1.0
1.2 maven spring-core beans context 4.3.13
<Version >$ {springframework. version} </version>
Add above
<Properties>
<Springframework. version> 4.3.13.RELEASE </springframework. version>
</Properties>
1.3 spring-web-mvc
1.4 maven mybatis 3.3.1
1.5 maven mybatis-spring 1.2.5
1.6 maven mysql 5.1.45
1.7 maven dbcp 1.4
1.8 maven spring-jdbc 4.3.13

2 base applicationContext. xml
2.1 spring. io search dbcp 12th All copies
<Context: component-scan base-package = "com. baidu"/>
2.2 mybatis-spring quick setup
<Property> copy <property name = "configLocation" value = "class: mybatisConf. xml"/>
2.3 mybatis-spring Chapter 6 injection er MapperScannerConfigurer

3 base mybatisConf. xml
3.1 getting started with mybatis: Build SqlSessionFactory from XML. Do not <mappers> not in <environments>
3.2 configure settings in mybatis XML

4. web. xml of the app
4.1 spring. io 7.12 Support for web applications with AnnotationConfigWebApplicationContext copy <context-param> and

<Listener> change param-value to classpath: applicationContext. xml
4.2 spring. io 7.12 Support for web applications with AnnotationConfigWebApplicationContext replication <servlet>

<Servlet-mappring> Delete the first <init-param> <param-value> and change it to classpath: springMVC. xml.

5 app jdbc. properties
5.1 spring. io search for copies in the <value> below dbcp 3rd
5.2 applicationContext. xml Replication
Jdbc. driverClassName = com. mysql. jdbc. Driver
Jdbc. url = jdbc: mysql: // localhost: 3306/mydb
Jdbc. username = root
Jdbc. password = root
6. springMVC. xml of the app
6.1 spring. io 22.16.1
6.2 copy the context header file in applicationContext. xml to springMVC. xml.
6.3 copy the scan package in applicationContext. xml to springMVC. xml


























Related Article

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.