文章列表

分类:后端

Spring Boot AOP 切片日志记录

1. 添加依赖 1.1 Maven依赖 <dependencies> <!-- Spring Boot Starter AOP --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop

阅读全文

Spring Boot 定时任务使用指南

1. 启用定时任务 在Spring Boot主类上添加 @EnableScheduling 注解: @SpringBootApplication @EnableScheduling public class Application { public static void main(String[] args) { S

阅读全文

Spring Boot 集成 Redis 最佳实践

本文介绍在 Spring Boot 中使用 Redis 的依赖安装、基础配置、通用工具类编写与常见使用方法,包含字符串、对象、哈希、集合、分布式锁与限流等场景。示例偏向 Lombok 与 Spring Boot 3/Spring Data Redis(Lettuce)。 依赖安装 <!-- Maven --> <dep

阅读全文