IDEA搭建Spring Boot框架再web页面进行输出!

第一步:

File —>New --->Project

IDEA搭建Spring Boot框架再web页面进行输出!

第二步:

IDEA搭建Spring Boot框架再web页面进行输出!

第三步:

IDEA搭建Spring Boot框架再web页面进行输出!

第四部

IDEA搭建Spring Boot框架再web页面进行输出!

第五步:

IDEA搭建Spring Boot框架再web页面进行输出!

第六步

IDEA搭建Spring Boot框架再web页面进行输出!

第七步:

IDEA搭建Spring Boot框架再web页面进行输出!

第八步:新建一个类 我这取名为Helloboot

package com.example.demo;

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

@RestController
public class Helloboot {
    //    http://localhost:8080/h就会调用这个方法并输出hello
    @RequestMapping("/h")
    public String abc(){
        return "你好,你已经搭好了Spring Boot";
    }
}

第九步:运行DemoApplication这个类:

IDEA搭建Spring Boot框架再web页面进行输出!IDEA搭建Spring Boot框架再web页面进行输出!

第十步:再控制台你会看到

IDEA搭建Spring Boot框架再web页面进行输出!

 

第十一步:去浏览器输入

IDEA搭建Spring Boot框架再web页面进行输出!

 

*************************************************************************************************************************

简单的SpringBoot就搭建完成了