会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
市丸银
知行合一
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
12
13
14
···
97
下一页
2025年5月16日
springboot token jwt
摘要: 一、导入依赖 <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-api</artifactId> <version>0.11.2</version> </dependency> <dependency> <groupId
阅读全文
posted @ 2025-05-16 00:07 市丸银
阅读(70)
评论(0)
推荐(0)
2025年5月15日
springboot 生成验证码 并存入 redis
摘要: 一、注入依赖 1、验证码依赖 <dependency> <groupId>com.github.whvcse</groupId> <artifactId>easy-captcha</artifactId> <version>1.6.2</version> </dependency> 2、redis依
阅读全文
posted @ 2025-05-15 20:42 市丸银
阅读(63)
评论(0)
推荐(0)
springboot 用户密码加密
摘要: 注意:在实体类添加密码字段注解 @TableField(value = "password", select = false) 一、引入依赖 <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifa
阅读全文
posted @ 2025-05-15 11:46 市丸银
阅读(36)
评论(0)
推荐(0)
2025年5月14日
springboot 开启 定时任务
摘要: 一、启动类 启动类添加注解 @EnableScheduling 二、创建定时任务类 package com.wt.lease.web.admin.schedule; import org.springframework.scheduling.annotation.Scheduled; import
阅读全文
posted @ 2025-05-14 21:37 市丸银
阅读(27)
评论(0)
推荐(0)
springboot 配置 时间格式和时区
摘要: 一、时间 1、注解(推荐) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date appointmentTime; 2、yaml spring: jackson: date-format: yyyy-MM-dd HH:mm:ss 二、时区
阅读全文
posted @ 2025-05-14 19:24 市丸银
阅读(129)
评论(0)
推荐(0)
2025年5月13日
springboot 返回 code
摘要: 1、创建result文件夹 2、创建ResultCodeEnum枚举 package com.wt.lease.common.result; import lombok.Getter; /** * 统一返回结果状态信息类 */ @Getter public enum ResultCodeEnum {
阅读全文
posted @ 2025-05-13 11:44 市丸银
阅读(34)
评论(0)
推荐(0)
2025年5月12日
springboot 属性 复制 A包含B的key,B的值赋值给A
摘要: BeanUtils.copyProperties(B, A)
阅读全文
posted @ 2025-05-12 21:20 市丸银
阅读(20)
评论(0)
推荐(0)
springboot 文件上传 使用 MultipartFile
摘要: @Autowired private FileService service; @Operation(summary = "上传文件") @PostMapping("upload") public Result<String> upload(@RequestParam MultipartFile f
阅读全文
posted @ 2025-05-12 10:23 市丸银
阅读(24)
评论(0)
推荐(0)
2025年5月11日
springboot 配置全局异常 处理
摘要: 一、依赖(基于springmvc) <!--spring-web--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </depend
阅读全文
posted @ 2025-05-11 23:17 市丸银
阅读(115)
评论(0)
推荐(0)
springboot 配置minio 保存图片
摘要: 一、注入依赖 <dependency> <groupId>io.minio</groupId> <artifactId>minio</artifactId> <version>8.5.17</version> </dependency> 二、创建配置类(配合yaml注入) package com.w
阅读全文
posted @ 2025-05-11 23:09 市丸银
阅读(36)
评论(0)
推荐(1)
上一页
1
···
6
7
8
9
10
11
12
13
14
···
97
下一页
公告