会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
牛牛
牛牛在线
博客园
|
首页
|
新随笔
|
新文章
|
联系
|
订阅
|
管理
上一页
1
2
3
4
5
6
7
8
···
10
下一页
2023年7月18日
springboot 全局异常处理类
摘要: 1、全局异常处理 import lombok.extern.slf4j.Slf4j; import org.slf4j.helpers.MessageFormatter; import org.springframework.beans.factory.annotation.Autowired; i
阅读全文
posted @ 2023-07-18 10:25 蜗牛无敌
阅读(13)
评论(0)
推荐(0)
编辑
2023年7月14日
springboot 使用caffeine 并监控本地缓存
摘要: 1、添加依赖 <dependency> <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> </dependency> 2、添加配置 package com.example.demo.c
阅读全文
posted @ 2023-07-14 17:57 蜗牛无敌
阅读(604)
评论(0)
推荐(0)
编辑
springboot log4j2.xml 模板
摘要: <?xml version="1.0" encoding="utf-8"?> <configuration> <properties> <!-- 文件输出格式 --> <property name="PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} |-%-5level [%
阅读全文
posted @ 2023-07-14 16:31 蜗牛无敌
阅读(126)
评论(0)
推荐(0)
编辑
2023年7月12日
springboot 自定义整合caffeine 本地缓存
摘要: 1、自定义缓存配置类 @Data @ConfigurationProperties(prefix = "page.cache") public class PageCacheProperties { private CaffeineConfigProperties caffeine = new Ca
阅读全文
posted @ 2023-07-12 14:03 蜗牛无敌
阅读(361)
评论(0)
推荐(0)
编辑
2023年7月11日
springboot 自定义参数转换器,把自定义字符串 转换成响应的对象
摘要: 1、定义参数转换器 并放入ios容器中 package com.example.demo.convert; import com.example.demo.domain.Phone; import org.springframework.core.convert.converter.Converte
阅读全文
posted @ 2023-07-11 09:26 蜗牛无敌
阅读(242)
评论(0)
推荐(0)
编辑
2023年7月10日
springboot 使用filter 增加全局 traceId,方便日志查找
摘要: 1、编写过滤器 package com.example.demo.filter; import org.slf4j.MDC; import org.springframework.util.StringUtils; import javax.servlet.*; import javax.servl
阅读全文
posted @ 2023-07-10 10:44 蜗牛无敌
阅读(403)
评论(0)
推荐(0)
编辑
2023年7月7日
java自定义注解,aop处理
摘要: 1、定义注解 package com.example.demo.anno; import java.lang.annotation.*; @Target({ ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @Documented p
阅读全文
posted @ 2023-07-07 15:05 蜗牛无敌
阅读(99)
评论(0)
推荐(0)
编辑
2023年7月5日
springboot 加载自定义的属性配置文件 或者xml文件
摘要: 1、properties user.properties name=zhangshan age=18 2、xml Pen1.xml <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE properties SYSTEM "http://java.sun
阅读全文
posted @ 2023-07-05 16:42 蜗牛无敌
阅读(389)
评论(0)
推荐(0)
编辑
2023年6月13日
json字符串解析 多语言替换
摘要: import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframe
阅读全文
posted @ 2023-06-13 21:22 蜗牛无敌
阅读(36)
评论(0)
推荐(0)
编辑
2023年5月17日
redis缓存key工具类
摘要: package store.b2c.c.utils; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import java.uti
阅读全文
posted @ 2023-05-17 10:55 蜗牛无敌
阅读(53)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
5
6
7
8
···
10
下一页
公告