Spring + SpringMVC + MyBatis frame
I. packet
added project profile dependent on the pom.xml:
Spring-webmvc.3.2.8.RELEASE.jar
Spring-jdbc.3.2.8.jar
MyBatis-3.2.5.jar
MyBatis-Spring-1.2.2. JAR
Jackson-Core-2.2.3.jar
Jackson-Annotations-2.2.3.jar
ackson-DataBind-2.2.3.jar
aspectjweaver-1.5.4 (the AOP)
Commons-CODEC-1.14.jar
Commons-DBCP-1.4.jar
mysql-connector-java.5.1.37.jar
Second, add a profile
-conf / mvc.xml the Spring-
-conf / the Spring-mybatis.xml
-mapper / SQL file
-web.xml
Third, the packet structure is divided
Controller
-Service
DAO
Aspect
Entity
util
Fourth, the three-step development of the function *
## send ajax request
1. event binding
2. Obtain parameters
3. $. Ajax request to send
Processing server ##
requests -> the DispatcherServlet
-> the HandlerMapping
-> Controller.execute ()
-> Service-> DAO-> database table
-> json return data in response to
## ajax callback handler
1. Success: forwarded to HTML
2. Failure: prompt.