Eclipse creates spring boot

Source: Internet
Author: User


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. In this way, boot is committed to becoming a leader in the burgeoning field of rapid application development (rapid application development). That is, spring boot is intended to simplify spring development, and the main idea is to reduce the introduction of spring so that novices can run the program in the spring frame as quickly as possible.

Today we're going to create the first project that was created based on Eclipse (eclipse-jee-neon-3-win32-x86_64.zip) +spring boot.

First, install the STS plugin

To create a project in Eclipse using spring boot, you must first install the STS (Spring Tool Suite (STS) for Eclipse) and choose to install it online if the speed is available, otherwise it is recommended that you choose the offline installation.

1. Online Installation

Help, Eclipse Marketplace

Search or select the "Popular" tab, select the Spring Tool Suite (STS) for Eclipse plug-in, install:

2. Offline installation

(1) Download the STS plugin first, for: https://spring.io/tools/sts

(2) Help->install New software

(3) Click "Add->archive.", then select the STS plugin that you just downloaded, and give the plugin a name, click "OK" on the line.

(4) Select several components to the end of the IDE to install it, if you wait for a long time, you can install one.

(5) To see if the installation was successful

Window->show View->other to see if there is a spring component, there is a sign that we have successfully installed it.

Second, create the Spring boot project

(1) Create the project and select Spring Starter Project. Fill in the various information related to the project, then next:

(2) Select the desired dependency, then next:

(3) The last "Finish" begins to download the jar package, which takes a long time to process.

Third, the operation of the project

(1) Right-click the main method in DemoApplication, Run as, Spring boot App, the project can be started.

How do we run our application and see the output of Hello world?

The first way is to run the Main method directly:

Select DemoApplication's Main method, right-click Run as->java applicacation, then open the browser input address: http://127.0.0.1:8080/can see hello It's world!.

The second way:

Right-project–> run as–> Maven build–> enter Spring-boot:run in goals, then apply, and finally click Run.

Four, packaging

1. Order: Clean Package

2. Execution command: Java–jar Xxxxxx.jar

Eclipse creates spring boot

Related Article

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.