In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
How to start Springboot, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
1. Springboot prequel
Needless to say, we have a series of lectures around Springboot, the cornerstone of the Spring cloud micro-services framework.
In the later stage, we will give a complete explanation and practice on the technology of SpringCloud micro-service from zero to one. Let everyone have a more in-depth and specific understanding of the java back-end technology, and master the technology step by step.
Java developers are to Spring what knights are to spears and warriors are to swords. The top three frameworks that java developers must master are the Spring family series.
Because it contains two sharp tools, IOC and AOP, which greatly simplify the complexity of software development, and win the first place in many open source frameworks with its excellent design patterns, it is a veritable Big Brother.
So as an important member of the Spring family, Springboot has covered more than 90% of the incomplete statistics of software developed in java language.
So Spring also put Springboot in the C position on its website.
According to the calculation, Spring has gone through four times, and the era of Spring1.0 is mainly aimed at configuring entity Bean through XML.
With the development of JDK, Spring2.X has entered a new era. Bean can be declared and injected through annotations, which greatly reduces the volume of XML configuration files and accelerates the speed of software development.
But configuration files for resource files and databases are, of course, highly recommended in XML. Java configuration is provided from Spring3.x, and you can better understand your Bean configuration by using Java configuration.
We are in this era, and both Spring4.x and Spring boot recommend java configuration.
As shown, we used three annotations on this class, the first @ Configuration acting on the class, which is equivalent to a XML configuration file.
This flag means that the class is automatically loaded when the container starts, and @ Bean acts on the method as an analogy to the Bean configured in XML.
Of course, there is also a @ LoadBalanced annotation method that belongs to load balancing in Springcloud, which will be explained in detail in a later topic.
In fact, with the development of the Internet and the iteration of the company's products, we can find that we have also experienced the change from struts to SpringMVC and then to Springboot and Springcloud.
Spring kernel mechanisms and design patterns are still something we need to study and learn. After all, Spring family buckets have occupied more than half of the country.
2. A preliminary study of Springboot
The official explanation is that springboot is a simple and easy way to create monolithic and enterprise applications that you can "run" directly.
And we also have our own introduction to the Spring platform and third-party libraries, so you can easily get started, and many Springboot projects require very little configuration. To sum up, Springboot uses "habit is better than configuration" to simplify complexity.
3. Build the project
Since it is officially said that building a project requires very little configuration, is it really what the official said?
In fact, you can see that the Spring official website can easily create the project you want, and supports Maven and gradle in the language type, as well as java, kotlin and Groovy in the language type.
There are three versions 2.20, 2.19 and 2.18 to choose from. And the support for third-party plug-ins is as easy to use as described on the official website.
Download the pre-set project and open it with eclipse or idea tool to see the structure directory and related references of our project.
From the pom file, we can see that the project structure of Springboot is much simpler than our traditional jar package reference and the previous build with pom file, and the relevant startup classes have been generated in the project structure.
You can start the project directly using the run method. Is it very simple? you can try it, too.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.