
自学遇到的一些小问题
兴趣使然的小小
精通“hello world”
展开
-
在整合springboot和Mybatis-plus时的一个小坑而已
一个小坑:Logging initialized using 'class org.apache.ibatis.logging.stdout.StdOutImpl' adapter.Registered plugin: 'com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor@4f281aaf'Property 'mapperLocations' was not specified.可能是因为你的类写错了,比如本来就该是一原创 2022-01-22 00:19:18 · 9238 阅读 · 0 评论 -
‘mapperLocations’ was specified but matching resources are not found.
‘mapperLocations’ was specified but matching resources are not found.<property name="mapperLocations" value="classpath*:cn/lazy/mapper/*.xml"/>//classpath后加上*号就可以解决classpath:只会到你的class路径中查找找文件;classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找如果还抱这个原创 2021-12-27 20:35:03 · 2290 阅读 · 0 评论 -
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.
在xml文件中碰到这样的报错的时候,有可能是你在里面使用了这种注释,编译会报错,可能这就是约定大于配置org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='id', mode=IN原创 2021-12-24 16:00:06 · 16427 阅读 · 0 评论 -
BindingException: Invalid bound statement (not found): dao.UserDao.getUserList()
大部分错误这个就能解决:出现这个错误时,按以下步骤检查一般就会解决问题:1:检查xml文件所在package名称是否和Mapper interface所在的包名一一对应;2:检查xml的namespace是否和xml文件的package名称一一对应;3:检查方法名称是否对应;4:去除xml文件中的中文注释;5:随意在xml文件中加一个空格或者空行然后保存。先说一下大部分遇到的情况也有可能是maven没有成功编译*mapper.xml文件在pom.xml中的build中加入下列代码就行&原创 2021-12-23 19:09:49 · 1233 阅读 · 0 评论