首页 > 编程语言 > 详细

Spring Boot学习笔记

时间:2018-05-03 12:29:22      阅读:444      评论:0      收藏:0      [点我收藏+]

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.第二种方式启动

技术分享图片

 

Spring Boot学习笔记

原文:https://www.cnblogs.com/bee-home/p/8984657.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!