Electricity supplier Internship Program on the first day (June 24)

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 explicitly newan 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.
      Here Insert Picture Description
  • 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

  1. 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.
  2. If Eclipse If there before the Chinese garbled, then see the article I wrote: https://blog.csdn.net/qq_37486501/article/details/93667060
  3. If the item before displaying an error, then see the article I wrote: https://blog.csdn.net/qq_37486501/article/details/93667792
  4. Some tips:
(1): 项目清理:  点击project-> clean 
(2): 先启动Tomcat->再加项目
(3):显示http: 未找到404->tomcat错误
  1. 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
  2. mybatis generator generates a reverse data, refer to the following blog: https://www.cnblogs.com/alsf/p/9324183.html
He published 192 original articles · won praise 204 · views 420 000 +

Guess you like

Origin blog.csdn.net/qq_37486501/article/details/93662061