
spring boot
临渊不羡渔
复制粘贴,不动脑子的太多了。该网站已经弃坑。博主已转博客园
展开
-
关于spring boot项目的日志配置
关于spring boot项目的日志配置新搭建项目,过去一直都是复制的别人的日志配置文件。心想自己也该了解了解这个了。然后百度一波,大家都是log4j2都很强大开始百度怎么集成,不出所料全是复制粘贴党。还各种复杂的xml配置。开始愚蠢的研究别人的xml配置。突然醒悟去spring官网找配置: https://docs.spring.io/spring-boot/docs/2.5.2/reference/htmlsingle/#features.logging.发现关于log4j2的配原创 2021-07-09 23:37:54 · 190 阅读 · 0 评论 -
redis序列化
redis序列化jedis重写序列化 @Bean("redisTemplate") public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) { // 构建序列化规则、在springboot 1.5.22.RELEASE下使用Jackson2JsonRedisSerializer存入redis的数据是一个json字符串,不带对象标识 Gen原创 2021-05-12 13:03:40 · 212 阅读 · 0 评论 -
redisson基础bean创建
原文出处:https://blog.youkuaiyun.com/u010730731/article/details/110002512单机模式@Beanpublic RedissonClient redissonClient() { RedissonClient redisson = Redisson.create(); Config config = new Config(); config.useSingleServer().setAddress("redis://127.0.0.1:6379");转载 2020-12-08 10:58:30 · 2015 阅读 · 2 评论 -
2020 redis基础配置类
参考:https://blog.youkuaiyun.com/u011410254/article/details/105490946/** * @author ListJiang * @class redis配置类 * @remark * @date 2020/8/1718:38 */@Configurationpublic class RedisConfig { @Bean("stringRedisTemplate") public StringRedisTemplate strin原创 2020-12-07 20:53:43 · 165 阅读 · 0 评论 -
Maven打包SpringBoot项目,排除第三方依赖包
直接上xml原文链接: Maven打包SpringBoot项目,排除第三方依赖包.<plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${java.version}</source> <target&g转载 2020-09-03 17:38:05 · 1386 阅读 · 0 评论 -
Spring缓存注解@Cacheable,@CachePut , @CacheEvict使用
Spring缓存注解@Cacheable,@CachePut , @CacheEvict使用Spring缓存注解@Cacheable,@CachePut , @CacheEvict使用@Cacheable属性说明应用实例@CachePut属性说明应用实例@CacheEvict属性说明应用实例@CacheConfig属性说明应用实例属性condition应用实例@Caching扩展Spring缓存注解@Cacheable,@CachePut , @CacheEvict使用使用redis缓存的时候,每次手动转载 2020-08-22 00:04:38 · 195 阅读 · 0 评论 -
http相关
http相关下载文件下载文件//处理中文文件名乱码 if (request.getHeader("User-Agent").toUpperCase().contains("MSIE") || request.getHeader("User-Agent").toUpperCase().contains("TRIDENT") || request.getHeader("User-Agent").toUpperCase().con原创 2020-07-01 21:29:30 · 131 阅读 · 0 评论 -
shiro 相关源码杂谈
shiro 相关源码阅读进行身份校验授予权限权限校验自己写的一些乱起八糟的,但愿以后我自己看到这里,还能看明白自己说的是什么?文字的含义是传递思维。进行身份校验核心是AuthenticatingRealm类的doGetAuthenticationInfo方法获取用户凭证所以需要自定义 realm,再将自定义的 realm 塞入安全管理器//自定义realmpackage com.jdw.springboot.realm;import com.baomidou.mybatisplus.cor原创 2020-06-19 22:01:50 · 132 阅读 · 0 评论 -
SpringBoot 集成 AOP
SpringBoot 集成 AOPpom.xml 引用切面类pom.xml 引用<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId></dependency>切面类package com.jdw.springboot.aspect;import lo原创 2020-06-08 11:56:05 · 148 阅读 · 0 评论 -
mybatis plus报Invalid bound statement (not found):解决
Mybatis-Plusmybatis plus报Invalid bound statement (not found):解决未配置mapper扫描1、未扫描到mapepr接口,配置mapper扫描注解2、未编译mapper.xml文件,(查看class文件夹下面有没有)3、mapper.xml文件的namespace属性未配置正确4、application.yml文件配置扫描mapper.xml路径错误功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一原创 2020-05-26 20:24:22 · 2896 阅读 · 0 评论