夜光带你走进 Java 成神之路-SpringBoot(五十三)擅长的领域

夜光序言:

 

能自己扛就别声张,你矫情幽怨的样子并不漂亮,做个勇敢的人,学着去承受命运给你的每一个耳光。

 

正文:

                           以道御术 / 以术识道

package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//@Controller //返回
@RestController //返回一个字符串
public class HelloController {

    @RequestMapping("/hello") //加一个这个注解,hello请求
    public String hello(){
        //调用业务,接收前端的参数
        return "Genius-Team";
    }

}

springboot 这个打jar包的工具如何使用呢

其实很简单~


发布了1477 篇原创文章 · 获赞 281 · 访问量 14万+

猜你喜欢

转载自blog.csdn.net/weixin_41987706/article/details/104014892