Springboot of entering the arena

Hello, you small partners Hello everyone, I'm Flowering monarch.

Today's theme is about Springboot Share Share theme, in fact, have thought about some of the issues order on sharing technology theme before writing this series, because I created the beginning of "IT dry warehouse," the public about the number that you want to share back-end technology Some dry goods.

Want you interested in small partners can learn or be able to learn new skills or some technical point, the back-end technology is not limited in terms of java is also involved go, Python, block chain, artificial intelligence and big data.

So I would like to learn these things make notes of the share to you, avoid stepping in the pit real progress together.

It is because of more technology involved, but will have a trace of concern when the series theme to share, after thinking decided interspersed tutorial system's various language publication.

If the junior partner have better suggestions or comments are welcome Flowering Jun to leave a message. Search "IT dry warehouse," every day is interesting and useful dry goods such as you, we progress together, grow together!

1, Springboot prequel

Much gossip that, this time around we cornerstone Springboot Springcloud series micro service framework will be explained.

The latter will SpringCloud micro technology services from zero to a full explanation and practical. So that we have more in-depth and detailed understanding of java on the back-end technology, step by step master the technology.

java developer of the Spring is like a knight in spear, sword is to the soldier. In java developers must understand framework Spring is ranked in the first three series family.

Because it contains the IOC and AOP two weapon greatly simplifies software development degree of complexity, and its excellent design model won first prize in the numerous open-source framework, is a veritable Big Brother.

Then as a valued member of the Spring family in incomplete statistics currently java language development software to Springboot as a framework already covered more than 90%.

So Spring's official website will also Springboot on the C position.

file

(Photo from Spring official website)

Spring has gone through changes must register four times, Spring1.0 era is mainly aimed at by way of XML configuration entity Bean. as the picture shows:

file

With the development of the JDK, Spring2.X entered a new era, may be declared and annotated by injection for Bean, greatly reducing the amount of body XML configuration file, accelerating the speed of software development.

But of course it is very recommended for the resource database and configuration files written in XML. From Spring3.x began offering a Java configuration, configuration using Java Bean can better understand your configuration.

Now we are in this day and age, and Spring4.x and Spring boot recommend use java configuration.

file

If, in this class we used three notes, the first @Configuration role in the class, the equivalent of an XML configuration file.

The meaning of this symbol is automatically loads the class when the container starts, @ Bean acting on the method and on the role of analogy Bean configuration in XML same.

Of course there is a @LoadBalanced annotated method belongs to the load balancing Springcloud, a topic that will be explained in detail later.

In fact, with the development and iteration of the Internet company's products, we can find in the technology selection we are gone from struts to SpringMVC then to Springboot and Springcloud this change, in fact, remain the same.

Spring core mechanisms and design patterns that we still need to study and learn. After all, Spring family bucket has occupied most of the country.

2, Springboot Study

file

Springboot official explanation is simple and easy to create a single enterprise application project, you can "direct run" the use of these procedures.

And we also have for Spring platforms and third-party libraries own profile, you can easily get started, many Springboot projects require only very little configuration. In summary Springboot is the use of "habit over configuration", simplify.

3, construction of the project

Since the construction of the official talked about a project requires minimal configuration, then we carry out combat to see if it is true, as the official put it?

To facilitate testing, we created our first project in the framework of Spring official website
official website: https: //start.spring.io/

file

In fact, we can can see Spring's official website can easily create a project that you want, and supports the Maven and gradle on the type of language, the type of language also supports java, kotlin, Groovy.

There are three aspects version 2.20,2.19,2.18 versions are available. And support for third-party plug-ins like the official line is spoken as easy to use.

The preset items can be downloaded eclipse or idea to see a reference tool to open the directory structure of our project and related

file

As can be seen from pom Springboot project file structure relative to the conventional jar package our previously referenced and is used to build the file pom lot simplified, and the structure has been generated in the project related startup class.

file

The method can be used directly run to start the project. It is not very simple, you can try Oh

file

Today's share went to here came to an end, if you like my share of trouble you click again, share, or comment, I was Xiaozhan king, we see the next issue, thanks to a worship -

file

This article from the blog article multiple platforms OpenWrite release!

Guess you like

Origin www.cnblogs.com/it-carry/p/11665492.html
Recommended