Intellij IDEA graphic tutorial for creating a spring-boot project,

Source: Internet
Author: User
Tags spring initializr

Intellij IDEA graphic tutorial for creating a spring-boot project,

Development Environment:

  • Jdk: jdk 8
  • Maven: maven-3.5.2
  • Development Tool: Itellij IDEA 2017.1.

Prerequisites: you have installed the above software and configured the jdk and maven environment variables.

Procedure:

Click Upload file --- Select new --- and click project..., as shown in:


Click Spring Initializr --- create jdk in the upper-right corner of Spring Initializr --- click next, as shown in:

View the information in the requirement modification and click next (you can use the default value directly)

Click "Web ---" on the left, select the Web in the middle column, and click "next", as shown in:

Enter the project name and save path --- "and click finish

Shows the created Project:

The code for creating the HelloController class is as follows:

package com.example.demo.controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RestController;@RestController@RequestMapping("/hello")public class HelloController { @RequestMapping("/say") public String sayHello() {  return "hello world"; }}

Run the main method in DemoApplication and access the http: // localhost: 8080/hello/say page as follows:

Summary

The above is a graphic tutorial on how Intellij IDEA creates a spring-boot project. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in time!

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.