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