查看spring官网:http://spring.io/

推荐使用工具idea:http://www.jetbrains.com/idea/

云盘地址(版本为17版本)

链接:https://pan.baidu.com/s/1dOxiPSaJGnlLoY73FhXZvw 
提取码:m3mm 

使用idea:file-->new-->project
SpringBoot2.x入门(一)[HelloWorld程序]

选择:spring Assistant

SpringBoot2.x入门(一)[HelloWorld程序]

选择完成之后 next 就ok

填写相关项目内容:
SpringBoot2.x入门(一)[HelloWorld程序]

next-->选择web

SpringBoot2.x入门(一)[HelloWorld程序]

next

SpringBoot2.x入门(一)[HelloWorld程序]

然后打开 目录如下

SpringBoot2.x入门(一)[HelloWorld程序]

建立controller包

创建 

HelloWorldController
package com.yst.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldController {

    @RequestMapping("/")
    public String helloTest(){
        return "hello world";
    }
}

SpringBoot2.x入门(一)[HelloWorld程序]

找到启动类 点击启动按钮

SpringBoot2.x入门(一)[HelloWorld程序]

启动完成

访问localhost:8080

SpringBoot2.x入门(一)[HelloWorld程序]

HelloWorld完成

相关文章:

  • 2020-07-19
  • 2021-12-12
  • 2022-01-14
  • 2021-11-18
  • 2021-11-22
  • 2021-06-02
  • 2022-12-23
  • 2021-06-18
猜你喜欢
  • 2022-12-23
  • 2022-02-11
  • 2021-04-01
  • 2022-12-23
  • 2021-11-12
相关资源
相似解决方案