Project Resource internship program used in infrastructure projects, including in the framework of SSM inside :()
https://download.csdn.net/download/qq_37486501/11255617
Fundamentals - frame structure and contents of each part has to prepare
This development is the use of SSM framework for the development, where: S refers Spring, S refers Springmvc, M refers Mybatis
- The Spring
the Spring assembled like the project of large bean plants, in the configuration file may specify particular parameters to call the constructor entity class to instantiate an object. The project can also be called a binder.
Spring is the core idea IoC (Inversion of Control), which no longer require the programmer to explicitlynew
an object, but to the Spring framework to help you to get everything done. - SpringMVC
SpringMVC interception in the project requested by the user, that is its core Servlet DispatcherServlet intermediary or assume such responsibilities foreground, the user requests through HandlerMapping to match Controller, Controller operation corresponding to the specific request is executed. SpringMVC corresponds to the SSH frame struts. - MyBatis
MyBatis is encapsulation of jdbc, it allows operation of the underlying database becomes transparent. mybatis operations are deployed around a sqlSessionFactory instance. File Mapper mybatis associated to each entity class by the configuration file, the configuration file Mapper sql statement required to map each type of database performed. Every time you interact with the database through sqlSessionFactory get a sqlSession, then execute sql command. - Web page realization:
page sends a request to the controller, the controller calls the business logic layer processing, the logical layer sends a request to the persistence, persistence layer returns to interact with the database, will result to the business layer, business logic layer processing is sent to the controller, The controller then calls the view to show the data.
- The entire process: User Access -> display layer -> Control Layer -> business layer -> persistence layer -> Database Access
-> fetch -> persistence -> service layer -> Control Layer -> display layer -> User - Requesting: front to back; development: from back to front
- Display layer view: generally written in html jsp page
- Control layer control (upon request decide which service calls), servlet-> SpringMVC
- Business layer: data processing (how to operate the database), service layer -> -Service
- Persistence: stored in a database or file, jdbc connection to the database into the Mybatis
write: dao interfaces and mapper mapping file
+ Conformable frame configuration database tables, package, profile
- The (( item placement project resources including basic items used in the framework of SSM :( inside)
https://download.csdn.net/download/qq_37486501/11255617 )) download, introducing Eclipse. - If Eclipse If there before the Chinese garbled, then see the article I wrote: https://blog.csdn.net/qq_37486501/article/details/93667060
- If the item before displaying an error, then see the article I wrote: https://blog.csdn.net/qq_37486501/article/details/93667792
- Some tips:
(1): 项目清理: 点击project-> clean
(2): 先启动Tomcat->再加项目
(3):显示http: 未找到404->tomcat错误
- Add mybatis the DTD file (Cause: a footnote (src-com.demo.mapper-TestMapper.xml)) , refer to the following blog: https://blog.csdn.net/a15920804969/article/details/79107852
- mybatis generator generates a reverse data, refer to the following blog: https://www.cnblogs.com/alsf/p/9324183.html