码迷,mamicode.com
首页 > 编程语言 > 详细

Spring Boot学习笔记

时间:2018-05-03 12:47:35      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:img   ring   ref   target   code   style   value   构建   detail   

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学习笔记

标签:img   ring   ref   target   code   style   value   构建   detail   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!