1、创建项目
然后完成
增加注解,写一个返回Hello Spring Boot的方法
package com.example.girl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@RequestMapping(value = "/hello",method = RequestMethod.GET)
public String say(){
return "Hello Spring Boot!";
}
}