SpringBoot
最编程
2024-10-04 13:20:16
...
1.SpringBoot的创建
hello.java
package com.leo.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
//请求处理类
@RestController
public class hello {
@RequestMapping("/hello")
public String hello(){
System.out.println("hello world ");
return "return hello world";
}
@RequestMapping("/hellos")
public String hellos(){
System.out.println("hello worlds ");
return "return hello worlds";
}
}
springboot启动成功
hello的时候就 return hello world
hellos的时候就 return hello worlds
并且在控制台也有相应的输出句子打印出来
上一篇: 更美观的 HTTP 性能监测工具:httpstat
下一篇: 240 搜索二维矩阵 II
推荐阅读
-
SpringBoot 中的数据访问
-
Spring Security] 基于 SpringBoot 3.3.4 版 ② 如何配置免验证路径
-
SpringBoot
-
SpringBoot 详细教程]-09-Redis 详细教程和 SpringBoot 集成 Redis [持续更新].
-
在线远程考试|基于 SpringBoot 的在线远程考试系统设计与实施(含项目源代码 + 论文 + 数据库)
-
腾讯云轻量级服务器 + pagoda 面板 + 基于 springboot 的网页部署
-
在 SpringBoot-MybatisPlus 项目中,在控制台中查看 sql 执行日志的方法
-
SpringBoot 实施社区医院数据集成解决方案
-
使用 XXL-JOB 实现灵活控制切片处理方案的 SpringBoot
-
springboot+vue+elementui 分片上传大文件