Pa difference between the road surface and Springboot of --SpringMVC

  If you let HR in an interview to talk about the relationship and distinction Spring, SpringMVC and Springboot, you prepare how to answer it? If suddenly asked this question I must not say, I say it is even with a few strokes too. After the interview perfectly calm and order to answer that question, we have from their level, characteristics and functions implemented to talk about it!

Spring

  Spring framework is like a family, there are a number of derivative products such as boot, security, jpa, and so on. But they are the basis of ioc and Spring aop, ioc provides dependency injection container aop, to solve the cross-section oriented programming, and then on the basis of both, to achieve the advanced features extend to other products. Spring MVC MVC framework is based on a Servlet, the main problem WEB development, because the Spring configuration is very complex, a variety of XML, JavaConfig, hin process more cumbersome. So in order to simplify the use of the developer, thus creatively introduced Spring boot, convention over configuration, the spring simplifies the configuration process.
  Some put it more simple: Spring initially using the "factory model" (DI) and the "agency model" (AOP) decoupling the application components. I feel very good use, so in this mode out a MVC framework (Spring with some of decoupling components), with the development of web applications (SpringMVC). And then found each development have to write a lot of boilerplate code, in order to streamline workflow, then developed a number of "lazy integration package" (starter), this is the Spring Boot.

 

SpringMVC

  Spring MVC provides a way to loosely couple to develop web applications.
  Spring Spring MVC is a module is a web frame. By Dispatcher Servlet, ModelAndView and View Resolver, makes developing web applications easy. To solve the problem areas is the site of application or service development --URL routing, Session, template engine, static Web resources, and so on. 

 

Springboot

  Spring Boot achieve the automatic configuration, reduces the complexity of the project built.
  As we all know the Spring framework requires a lot of configuration, Spring Boot introduced the concept of automatic configuration, so that the project settings easy. Spring Boot itself does not provide the core features and extended functionality of the Spring framework, but for quick, agile develop a new generation of applications based on the Spring Framework. That is, it is not intended to replace the Spring approach, but the Spring framework and closely integrated tools for lifting Spring developer experience. At the same time it integrates a large number of third-party libraries common configuration (e.g. Jackson, JDBC, Mongo, Redis, Mail , etc.), Spring Boot application of these third-party libraries almost zero configuration of the box (out-of-the- box), most of the Spring Boot application only requires a very small amount of configuration code, developers can focus more on business logic.
  Spring Boot just bearers, help us to simplify the process of building the project. If the carrier is WEB project, using as Spring MVC MVC framework, it is exactly the same as described above you and workflow, because this part of the work is done rather than Spring MVC Spring Boot.
  For the user, after switching to Spring Boot, project initialization methods have changed, the profile has changed, the other is no need to install a separate Tomcat server such containers, maven jar packets directly run up play is a website, but you most core business logic and business processes without any change.

 

So, with the most concise language is summed up:

  Spring is an "engine";


  Spring Spring MVC is based on a framework MVC;


  Spring Boot is based on a set of conditions for rapid development of integrated packages Spring4 registered.

Guess you like

Origin www.cnblogs.com/wangdh666/p/11348651.html