The difference springboot VS springmvc

        It found that many small partners know the difference springboot springmvc and, in fact, from the function and essence, these two would have no relationship. If you have to say there is anything that belongs to the family of the spring.

     What is springboot: a tool for automatic configuration of

     What is springmvc: a web framework

    Why no relation to the frame 2 will be very prone to confuse?

Because when springboot embedded springmvc a lot of people think it is another web framework, and this is a misunderstanding . In fact it is only the original springmvc compared to the original configuration in the content xml file made automated configuration only.

       springboot will only match the original configuration with the spring convention of using greater than the configured automated way to load it, so that development becomes more simple and convenient. Mybatis like when embedding e.g. springboot orm frame, you need to reload the DataSource, the configuration corresponding to the configuration conventions data source spring.datasource.type, configured by the corresponding driver class name spring.datasource.driverClassName. Often we want to own modules embedded springboot only necessary when adding corresponding starter can be, for example, some common starter:

We just find a starter look:

This is the druid's starter, we can see that there are corresponding initialization method.

So springboot each starter will go in to automatically load the relevant configuration by combining @Configuration and @Bean notes at startup, which is the core of springboot

to sum up:

 We do not know the difference between springboot and springmvc because knowledge of these frameworks are just floating on the surface, not deep understanding. It becomes more and more in this age of automation, we need to increase the depth of understanding of the framework, strengthen the study of the underlying

Published 25 original articles · won praise 51 · views 20000 +

Guess you like

Origin blog.csdn.net/Royal_lr/article/details/99441905