A , Summary:
1.1 the Spring are layered JavaSE / EE full-stack (stop) lightweight open source framework
1.2 Layered: three-layer structure of the EE SUN provided: a control layer, a business layer, data access layer (persistence layer)
1.2.1 struts: web layer
1.2.2 Hibernate: Data Access Layer
1.2.3 Mybatis: Data Access Layer
Second, the operating
2.1 Copy jar package : Spring + SpringMVC package: the AOP ------ Development Framework: Aspect ------ Spring dependent jar package: ------ mysql connection data: ------ connection Pooling jar: ------ Springmvc file upload component dependent on the Apache fileupload: ------ Json data: jstl standard tag library: ------ Mybatis a jar frame-related Mybatis jar package : ------ Mybatis dependencies: ------ Mybatis integrated spring framework jar package:
2.2 build framework
2.2.1 configuration file: Spring configuration files src created the following: applicationContext.xml integrity constraints
2.2.2 Profile --- Spring configuration file applicationContext.xml
2.2.3 create a database connection information below src: jdbc.properties
2.2.4 springMVC profile src created the following: springmvc-config.xml (the constraining same spring configuration file)
2.2.5 Profile --- web.xml
2.2.6 Testing
2.2.7 mybatis: adding configure the applicationContext.xml mybatis ,, mybatis-mybatis-config.xml (mybatis.pdf P3, P14) ,, Test
Three, UserDao.xml Xml the head restraint (mybatis.pdf P4)
Namespace <mapper namespace = "com.yh.dao.UserDao"> to interface with one-3, sql statement - Inquiry
Operation pay attention to their package name, to be continued! ! ! ! ! !