Springboot入门程序代码:
package com.itheima.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Hellocontroller {
@RequestMapping("/Hello")
public String hello(){
System.out.println("Hello World~");
return "Hello World~";
}
运行结果:
2.利用Postman模拟发送get和post请求