当前位置: 首页 > news >正文

springboot初体验

目录

环境

controller

修改端口号

更改banner图标

运行结果


最核心的:自动装配

环境

jdk17
springboot3.3.5
maven3.8.2

controller

controller层和启动类同级

package com.example.demo.controller;
​
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
​
@RestController //返回字符串
public class HelloController {@RequestMapping("/HelloController")public String test(){return "hello,springboot";}
}

修改端口号

spring.application.name=demo
# 修改端口号
server.port=8081

更改banner图标

[​]  https://www.bootschool.net/ascii 更改banner图标

运行结果

http://www.lryc.cn/news/481527.html

相关文章:

  • 使用kalibr_calibration标定相机(realsense)和imu(h7min)
  • 绿色工厂认定流程
  • 《Python游戏编程入门》注-第5章5
  • LangChain Ollama实战文献检索助手(二)少样本提示FewShotPromptTemplate示例选择器
  • K倍区间 C++
  • Linux - 弯路系列3:安装和编译libvirt-4.5.0
  • Jenkins插件使用问题总结
  • u盘怎么重装电脑系统_u盘重装电脑系统步骤和详细教程【新手宝典】
  • Sql server查询数据库表的数量
  • Linux学习笔记之软件包管理RPM与YUM
  • 15分钟学 Go 第 41 天:中间件的使用
  • 《Python 与 SQLite:强大的数据库组合》
  • Golang | Leetcode Golang题解之第552题学生出勤记录II
  • Vue3 常用代码指南手抄,超详细 cheatsheet
  • 结构体是否包含特定类型的成员变量
  • 堆排序与链式二叉树:数据结构与排序算法的双重探索
  • 用 Python 从零开始创建神经网络(四):激活函数(Activation Functions)
  • 使用 Flask 和 ONLYOFFICE 实现文档在线编辑功能
  • 【C++】【算法基础】序列编辑距离
  • 【Android】轮播图——Banner
  • 学SQL,要安装什么软件?
  • webstorm 设置总结
  • 基于Spring Boot的养老保险管理系统的设计与实现,LW+源码+讲解
  • Java | Leetcode Java题解之第541题反转字符串II
  • sql分区
  • [OpenGL]使用OpenGL实现硬阴影效果
  • 嵌入式采集网关(golang版本)
  • ctfshow(328)--XSS漏洞--存储型XSS
  • 【C#】Thread.CurrentThread的用法
  • 简单分享一下淘宝商品数据自动化抓取的技术实现与挑战