With spring boot, why understand spring MVC

Javaesandyou 2022-01-27 05:50:12 阅读数:473

spring boot understand spring mvc

01 What is? Spring Boot?

First ,Spring Boot It is a popular framework now , It can be developed quickly , Including myself, I am also using it to develop projects .

Its advantage is that it simplifies Spring Configuration of related components , Realize automatic configuration , Reduce the complexity of project construction , Make development easier , So as to improve the development efficiency .

Spring Boot It does not provide Spring The core features of the framework and its extended functions , Just for fast 、 Agile development of a new generation based on Spring Framework applications .

Spring Boot It's not a substitute Spring Solutions for , But and Spring Frame tight for lifting Spring Tools for developer experience .

At the same time, it integrates a large number of commonly used third-party library configurations , Such as Jackson、JDBC、Mongo、Redis、Mail etc. .

Spring Boot These third-party libraries in the application can be used out of the box with almost zero configuration (out-of-the-box), Most of Spring Boot Applications require very little configuration code , Developers can focus more on business logic .

in other words ,Spring Boot It just plays a bearing role , Help you simplify the process of project construction .

If the load is Web project , Use Spring MVC As MVC frame , Then the whole business workflow is still composed of Spring MVC To complete .

therefore Spring Boot It can't be replaced Spring MVC, It just simplifies Spring MVC Related configuration of ,Spring Boot I've done a lot of bottom work for you .

02 Spring Boot still Spring MVC?

Here you can have such a question . Since the use of Spring Boot Can be simplified Spring MVC Configuration of , Development is faster and more convenient , Then just use it , Why learn Spring MVC Well , Why do you keep simple things without , You have to use complex things ?

This problem needs to vary from person to person , If you are an experienced developer 、 Yes Spring An old driver who knows the product principle of the framework system very well , It goes without saying , I definitely recommend you to use Spring Boot.

But if you are an inexperienced person , Yes Spring Developers who don't know much about the framework system , Oversimplification is not necessarily a good thing for you .

Behind the simplicity is the hidden learning curve , You don't need to know Spring MVC In the case of principle, it can be used for development , This is called knowing it but not knowing why , Not the right way to learn .

Spring Boot The advantage is that the framework helps you shield a lot of underlying operations , Can complete rapid development , But everything has two sides .

It shields the underlying operation and your understanding and learning of the underlying principles , If you can only simply use the framework , Once you encounter more complex problems , It must be a face of ignorance .

Because if you don't understand the principle , There is no way to solve the problem , You only know Spring Boot Some operations are completed automatically , But I really don't know what operations it has completed , think about it , Is this way really conducive to self-improvement ?

Unless you just want to move bricks for a lifetime , Don't consider doing some underlying architecture or deeper work .

It's like a racing enthusiast , If it's just good driving skills , That can only be a fan forever ; If you want to be a real master , It must be necessary to constantly debug and refit the car by yourself , Until the performance reaches the limit of the car .

If you don't even know the structure of a car , Can only drive , How can we complete the performance optimization and modification of the vehicle , therefore , Not only should we have first-class driving skills , Also understand the internal principles of the car , To become a real old driver .

It's the same with writing code , If you just stay in using the rapid development framework to complete the project , Without delving into the underlying principles , There will never be a texture improvement , Can only adjust the method heap logic . Without tamping the underlying system , Blindly pursuing agility and efficiency , More haste, less speed. .

03 Deep learning ability determines your height

This is why a large number of programmers worry about the so-called 30-year-old bottleneck , But you'll find that awesome people are always awesome , In his twenties 、 More awesome in your thirties , There is no bottleneck , Why is there such a gap ?

One big reason is the difference of deep learning ability , You always stay on the surface application layer , How can I improve my ability of deep learning , Therefore, many programmers who have worked for five or six years are not much different from newly graduated students , It's just that bricks move faster .

If you don't want to keep moving bricks , If you want to improve your value , Then don't just stay at the application layer , Pay more attention to the hidden content under the application layer ,Spring MVC It's also a framework , It also shields a lot of things .

That's why we use it at the beginning of the course 4 This article introduces Spring IoC Why , At the same time, we will also take you to write one by yourself in the course Spring MVC frame , Explore its underlying principles .

Of course , Whether it's Spring Boot still Spring MVC, Include Java Language itself is an application layer thing in the whole system , Therefore, we have always been advocated to learn data structure algorithms 、 Computer theory , Including computer networks , Only the underlying architecture is solid , Will pull higher , This is a mode of thinking .

copyright:author[Javaesandyou],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/01/202201270550051743.html