Current location - Education and Training Encyclopedia - Resume - What is ssm framework?
What is ssm framework?
SSM(Spring+SpringMVC+MyBatis) framework set is integrated by three open source frameworks: Spring, SpringMVC and MyBatis, and is often used as the framework of web projects with simple data sources.

1, spring

Spring is like a big factory, assembling beans in the whole project. In the configuration file, you can specify that the constructor of the entity class is called with specific parameters to instantiate the object. It can also be called adhesive in engineering.

The core idea of Spring is IoC (Control Inversion), that is, programmers no longer need to explicitly' create' an object, but let the Spring framework do it for you.

2、SpringMVC

SpringMVC intercepts user requests in the project, and its core Servlet, namely DispatcherServlet, assumes the role of intermediary or foreground, and matches user requests to the controller through HandlerMapping, and the controller is the specific operation to be performed according to the request. SpringMVC is equivalent to struts in SSH framework.

3、mybatis

Mybatis is the encapsulation of jdbc, which makes the underlying operation of the database transparent.

The operations of Mybatis are all around an instance of sqlSessionFactory. Mybatis is associated with the Mapper file of each entity class through the configuration file, and the Mapper file configures the sql statement mapping required by each class to the database. Every time you interact with the database, you get a sqlSession through sqlSessionFactory and then execute the sql command.