SpringBoot entry and configuration

A, SpringBoot entry

SpringBoot is a new framework provided by Pivotal team, which is designed to simplify the development process as well as the initial build new Spring applications. The framework uses a particular manner be configured so that the developer is no longer necessary to define the configuration of the template. In this way, Spring Boot committed to rapid application development booming (rapid application development) to be a leader.

SpringBoot main features are:

⚫ create stand-alone applications Spring

⚫ embedded Tomcat, no need to deploy the WAR file

⚫ simplify Maven configuration

⚫ automatically configure Spring

⚫ provide production-ready features, such as indicators, health checks and external configuration

⚫ absolutely no code generation and no configuration requirements to XML

SpringBoot can be summarized as follows: a rapid development framework, it can help us to quickly integrate third-party frameworks (mainly by means of Maven dependencies), complete with annotations, to streamline XML configuration, built-in embedded Http server (Tomcat, Jetty), default embedded Tomcat server, a Java application to final execution.

SpringBoot framework audience so people of all ages, let us feel agility under SpringBoot framework through examples of it.

First, the development environment to build

 

1. Download: Official Download the latest version: http://maven.apache.org/download.cgi

2, Installation and Configuration:

System Requirements:

 

 

 Decompression:

 

 

 

 

 bin directory: Executable files

boot directory: class loader file

conf directory: The most important configuration files, especially setting.xml

lib directory: maven project using the jar package

 

Environment variable configuration:

1. Select Address: D: VevaStudyapache-maven- 3.6.0

1. Right My Computer - Properties - Advanced System Settings - Environment Variables - System variables -Path

 

 

 

 

 

 2, add the environment variable

 

 

 3, test version

Enter cmd to open the window as an administrator enter mvn -v test run in a window.

FIG operating results as follows:

 

 

 

3, warehouse configuration

Create a local repository:

 

 

Ali cloud build warehouses:

 

 

Maven integration compiler

Configuring maven

wiondow ----- --- perfernces maven;

Installations:

 

 

 

 

 

 user settings:

 

 

 

Configuration jdk:

 

 

 

 

 

 

 

 

New Project:

 

 

 1, right---- other ---- maven

 

 

 

 2、

 

 

 3、

 

 

  4、

 

 

5, configuration project structure

The two projects were being given a full election and then click Remove to delete

 

 

 

 

 

 

 6, configuration tomcat

 

 

 

maven commonly used commands:

 

 

 

 

maven lifecycle:

 

 

 

 

SpringBoot Optimization:

1. Import dependence simplified Maven 

2. Automatic Configuration Spring

Conventions greater than 3. Configuration 

4. Fully notes, reducing xml configuration

SpringBoot entry procedures:

1, create a Maven project

 

 

 

2, project dependencies introduced

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/qw0316/p/12546526.html