What is a springboot
Spring Boot is a new framework from the Pivotal team designed to simplify the initial setup and development process for new Spring applications.
The framework uses a specific way to configure so that developers no longer need to define boilerplate configurations. In this way, Spring Boot aims to be a leader in the burgeoning field of rapid Application development.
Springboot is built on top of the Spring Framework, and Spring Cloud is based on SpringBoot. Therefore, if you need to take the micro-service line in the later stage, Spring Boot is an essential intersection.
What skills do you need to learn Springboot
First, you need to understand the basic Java syntax and the spring-based framework.
Environment to prepare
Jdk1.8 and above
Download address: www.oracle.com/java/techno...
Once the download is complete, proceed to the next step until it is complete. Use the keyboard WIN+R key to open the CMD window, type Java -version, as shown below, to prove that you have successfully installed JDK.
Maven 3.2.5 and above
Download address: maven.apache.org/download.cg...
Install the MAVEN_HOME environment variable. The value of the MAVEN_HOME environment variable is the path of your unzipped Maven. Add %MAVEN_HOME%\bin to the value of the path variable.
To verify that your Maven installation is successful, enter MVN -v in CMD
Maven can be used directly after installing maven, but the foreign mirror network can transfer to the domestic access speed (you know), so we can modify the image source, find maven unzip directory in the config folder setting. XML file, edit and add the following content:
! -- Remote storage -- mirror idaliyun/id namealiyun Maven/name mirrorOf*/mirrorOf urlhttp://maven.aliyun.com/nexus/content/groups/public//url /mirror Copy the code
Either IDEA or MyEclipse (this course is based on IDEA)
After downloading idea, search for Maven in File - Settings and fill in the maven directory you just unzipped
At this point, the environment is ready, so let's pick up the "brush" and write hello World.
Open idea, file New Project
Then go all the way to Next until you finish opening the project as shown below:
Note that there is a jar package import prompt for Maven in the lower right corner. You can choose either the first one (it will be displayed every time you need to import a JAR) or the second one (it will be imported instead of asking you next time). PS: It will be a bit slow to introduce jar packages for the first time, so just wait. After downloading, let's look at the directory structure as follows:
Add the following code to lesson1Application.java:
When the console prints out :(from the console it can be seen that the service is started on port 8080)
Enter your address in your browser: http://localhost:8080/helloworld can see:
Congratulations: your first Hello World run with a brush!
SpringBoot actual combat: 10 minutes to quickly fix the environment