Start from scratch learn spring Boot

Source: Internet
Author: User

                What is Spring boot?

Spring Boot is a new framework provided by the pivotal team designed to simplify the initial setup and development of new spring applications. The framework uses a specific approach to configuration, which eliminates the need for developers to define boilerplate configurations.

                      Spring boot Feature

1. Create a standalone spring application
2. Embedded Tomcat, no need to deploy the war file
3. Simplify MAVEN Configuration
4. Automatically configure Spring
5. Provide production-ready features such as indicators, health checks and external configurations
6. Out-of-the-box, no code generation, and no XML configuration.

Spring Boot Feature Understanding

Provides a faster start-up experience for spring-based development
Out-of-the-box, no code generation, and no XML configuration. You can also modify the default values to meet specific requirements.
Provides some of the most common non-functional features in large projects, such as embedded servers, security, metrics, health detection, external configuration, and more.
Spring boot is not an enhancement to spring functionality, but rather a way to quickly use spring.

Development Preparation

Development environment JDK 1.8
Development tools (Eclipse)
Project management tools (Maven)

                  Hello World's New project

Create Maven Project (Spring-boot-hello)

the pom.xml of Hello World

<!--
Spring Boot Parent dependency, the introduction of this post-related introduction will not need to add a version configuration, Spring boot will automatically select the most appropriate version to add.
-
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.1.RELEASE</version>
</parent>

Java.version Specify the JDK version number:
<java.version>1.8</java.version>

Add Spring-boot-starter-web Dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

the coding of Hello World

Codeing steps:
Create a new controller class
New Startup Class (App–main method)
Test code

Start from scratch learn spring Boot

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.