
Spring Boot
文章平均质量分 52
wonde2018
爱拼才会赢!
展开
-
shiro安全漏洞问题解决方案
ruoyi之前的系统后台框架,shiro存在反序列化安全漏洞,升级了shiro jar包版本,仍然能破解:因为CipherKey写死了为:fCq+/xW488hMTCD+cmJ3aQ==,容易被爆破密钥:所以解决方案就是:1升级shiro jar包版本 2更换CipherKey更换方法:设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)Base64.encodeToString(CipherUtils.generateNewKey(128, “AES”).getEncoded())原创 2021-12-17 16:50:28 · 2130 阅读 · 0 评论 -
事务嵌套,只保存内层正常的记录,其它记录不保存
内层不出错的方法,开启新事务注解@Transactional(propagation = Propagation.REQUIRES_NEW) public int saveCategory(Category category) { int i = categoryMapper.insertCategory(category); return i; }内层出错的方法,开启新事务注解@Override @Transactional(propagation = Propagation.RE原创 2020-10-19 14:13:52 · 192 阅读 · 0 评论 -
Spring Boot学习
1、如何写测试类?添加如下两个注解@RunWith(SpringRunner.class)@SpringBootTest或者继承测试主类,如:OrderApplicationTests,然后再加上@Component注解即可案例package com.imooc.order.repository;import com.imooc.order.OrderApplicatio...原创 2018-11-06 10:07:59 · 146 阅读 · 0 评论 -
A component required a bean of type 'com.example...' that could not be found解决办法
工程启动报错A component required a bean of type ‘com.example…’ that could not be found解决办法一:1、再启动类添加mapper包扫描注解即可@MapperScan(“com.example.firstspringboot.dao”)解决办法二:在每个mapper接口上添加@mapper注解...原创 2019-01-09 21:10:46 · 34799 阅读 · 3 评论 -
springboot invalid bound statement (not found)解决办法
调用接口,报错内容截图如下:原因:缺少配置,为指定mybatis-config.xml的位置解决办法:在application.yml文件中添加一下配置即可mybatis: config-location: classpath:mybatis/mybatis-config.xml mapper-locations: classpath:mybatis/mapper/*.xml ...原创 2019-01-09 21:54:51 · 11508 阅读 · 0 评论 -
The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone解决办法
报错截图:解决办法:在配置数据库连接的时候添加serverTimezone=UTC,如下图:原创 2019-01-09 22:00:04 · 153 阅读 · 0 评论 -
springboot使用redis
一 、非注解形式引入依赖:在pom文件中添加redis依赖:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId></dependency>...原创 2019-01-16 19:02:23 · 222 阅读 · 0 评论