随笔分类 -  springboot错误

摘要:Error creating bean with name ‘dataSource’: Unsatisfied dependency expressed through field ‘basicProperties’; 新建的springboot项目没有导入这个包 <!-- jdbc--> <dep 阅读全文
posted @ 2022-06-24 15:06 Hello霖 阅读(1282) 评论(0) 推荐(0)
摘要:拦截器校验token 使用到了redis 注入的时候用了@Autowired @Autowired private StringRedisTemplate redis; 发现注入一直为null 报错无法使用 原因是 拦截器是在springcontext之前就创建的,redis还未被加载出来,所以注入 阅读全文
posted @ 2022-03-20 17:15 Hello霖 阅读(937) 评论(0) 推荐(0)
摘要:用mybatispluc往数据库新增值一直提示 Could not set property 'id' of ' “xxxxxxxxxxxxxxx” 并且报argument type mismatch错误 参数类型不匹配 原因是数据库主键自动自增 和 mybatisplus自动递增方式不同 myba 阅读全文
posted @ 2022-03-09 13:18 Hello霖 阅读(315) 评论(0) 推荐(0)
摘要:背景: 在做前后端分离时,牵扯到跨域,但是已经设置了跨域前端设置了允许携带Cookieaxios.defaults.withCredentials = true;后端也配置了跨域: @Configuration public class WebConfig implements WebMvcConf 阅读全文
posted @ 2022-03-04 15:08 Hello霖 阅读(551) 评论(0) 推荐(0)
摘要:maven导入报错 Cannot resolve org.springframework.boot:spring-boot-autoconfigure:2.6.2 解决1: 删除本地maven对应的包重新下载 解决2: 可能是springboot版本问题,降低版本(之前是2.6.2不可以。改成2.5 阅读全文
posted @ 2022-03-02 11:28 Hello霖 阅读(2184) 评论(0) 推荐(0)