09 2024 档案

Springboot 配置redis
摘要:@Configuration public class RedisConfig { @Value("${spring.data.redis.host}") private String redisHost; @Value("${spring.data.redis.port}") private in 阅读全文

posted @ 2024-09-11 14:46 lxxd 阅读(42) 评论(0) 推荐(0) 编辑

Springboot基于注解鉴权
摘要:@Slf4j @Component public class ResourceInterceptor implements HandlerInterceptor { @Resource UserRoleService userRoleService; @Override public boolean 阅读全文

posted @ 2024-09-11 14:43 lxxd 阅读(23) 评论(0) 推荐(0) 编辑

Springboot使用kaptcha生成验证码
摘要:<dependency> <groupId>com.youkol.support.kaptcha</groupId> <artifactId>kaptcha</artifactId> <version>2.3.2</version> </dependency> import com.google.c 阅读全文

posted @ 2024-09-11 14:32 lxxd 阅读(43) 评论(0) 推荐(0) 编辑

Springboot开启debug和打印mapper的sql
摘要:debug: true logging: level: com.bj58.recommend.communication.mapper: debug 阅读全文

posted @ 2024-09-11 14:28 lxxd 阅读(22) 评论(0) 推荐(0) 编辑

Springboot添加traceid
摘要:<?xml version="1.0" encoding="UTF-8"?> <configuration debug="true"> <include resource="org/springframework/boot/logging/logback/defaults.xml"/> <sprin 阅读全文

posted @ 2024-09-11 14:28 lxxd 阅读(164) 评论(0) 推荐(0) 编辑

Springboot 前后端不分离,serve静态文件
摘要:打包后文件放到 src/main/resources/static 目录 在application.yaml中添加 spring: mvc: static-path-pattern: /** web: resources: static-locations: classpath:/static/ 阅读全文

posted @ 2024-09-11 14:19 lxxd 阅读(94) 评论(0) 推荐(0) 编辑

Springboot LocalDateTime 格式化
摘要:import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; import com 阅读全文

posted @ 2024-09-11 14:17 lxxd 阅读(36) 评论(0) 推荐(0) 编辑

Springboot 统一返回接口
摘要:import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class Commo 阅读全文

posted @ 2024-09-11 14:15 lxxd 阅读(18) 评论(0) 推荐(0) 编辑

Springboot枚举自定义序列化
摘要:package xxxxxxxxxxxxx; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jac 阅读全文

posted @ 2024-09-11 14:06 lxxd 阅读(98) 评论(0) 推荐(0) 编辑

导航