做web开发就选spring web
写一个controller.BookController.java:
//restful
@RestController
@RequestMapping("/books")
public class BookController {
//二级访问路径无
@GetMapping
public String getById(){
System.out.println("springboot is running....");
return "springboot is running....";
}
}
直接运行它:
服务器就跑起来了。
然后直接到网页上去访问就行。



