Spring Boot学习笔记

Rest的理解

PS : 因为REST并不是一种具体的技术,也不是一种具体的规范,REST其实是一种内涵非常丰富的架构风格。

PS:spring mvc和spring boot没有直接的联系

1.构建项目

删除红色文件

启动项目

1.第一种方式启动

package com.bee.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,springboot!!!";
    }
}

 2.第二种方式启动

猜你喜欢

转载自www.cnblogs.com/bee-home/p/8984657.html