当前位置:网站首页>Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution
Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution
2022-07-03 02:27:00 【Mengyuan Xingfan】
Network has many solutions , I haven't solved it , It turned out to be a file xml.xml 了 , One more. .xml
Other methods are attached below :
1. Check xml Where are the documents package Name and Mapper interface Package name
<mapper namespace="me.tspace.pm.dao.UserDao">
mapper Of namespace It's not right !!! Attention system modification .
2.UserDao The method of in UserDao.xml There is no , And then execute UserDao The method will report this
3. UserDao The method return value of is List<User>, and select Element is not configured correctly ResultMap, Or just configure ResultType!
4. If you confirm that there are no above questions , Please modify the corresponding xml file , For example, delete a blank line , preservation . Problem solving
5. look down mapper Of XML Whether the configuration path is correct
About Mybatis-plus Report errors Invalid bound statement (not found):com.xxx.xxx.xxxMapper.selectList
This error may be written by yourself UserMapper Time inherits BaseMapper But not added Generic .
Just add the corresponding generic ,
The result will not be wrong
If you check everything , And it turns out there's no problem , It's better to look at your own configuration file , At that time, it was very likely that the configuration was less scanning mapper Things that are :
Creating SqlSessionFactory When , The following configuration is added :
sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/*.xml"));
sqlSessionFactoryBean.setTypeAliasesPackage("com.test.maper");
And pay attention to sqlSessionFactoryBean.setTypeAliasesPackage Parameter does not support wildcards *, If there are multiple packages available through "," Equal division
If you need to load the dependency passed jar In bag mapper In the catalog xml,classpath:mapper/*.xml It is amended as follows classpath*:mapper/*.xml
边栏推荐
- Awk from getting started to being buried (2) understand the built-in variables and the use of variables in awk
- Gbase 8C system table PG_ aggregate
- 4. 类和对象
- stm32F407-------DMA
- easyPOI
- Leetcode 183 Customers who never order (2022.07.02)
- GBase 8c触发器(三)
- GBase 8c系统表-pg_aggregate
- 《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨
- GBase 8c触发器(二)
猜你喜欢
线程安全的单例模式
easyPOI
基于线程池的生产者消费者模型(含阻塞队列)
面试项目技术栈总结
[advanced ROS] Lesson 6 recording and playback in ROS (rosbag)
Detailed introduction to the deployment and usage of the Nacos registry
Producer consumer model based on thread pool (including blocking queue)
Awk from introduction to earth (0) overview of awk
通达OA 首页门户工作台
4. 类和对象
随机推荐
Word word word
Socket programming
Cfdiv2 fixed point guessing- (interval answer two points)
人脸识别6- face_recognition_py-基于OpenCV使用Haar级联与dlib库进行人脸检测及实时跟踪
GBase 8c系统表pg_cast
Gbase 8C system table PG_ aggregate
Packing and unpacking of JS
GBase 8c触发器(三)
Monitoring and management of JVM
Summary of ES6 filter() array filtering methods
Gbase 8C trigger (III)
简单理解svg
Machine learning process and method
javeScript 0.1 + 0.2 == 0.3的问题
awk从入门到入土(2)认识awk内置变量和变量的使用
Memory pool (understand the process of new developing space from the perspective of kernel)
[Flutter] dart: class;abstract class;factory;类、抽象类、工厂构造函数
Gbase 8C system table PG_ database
Cfdiv2 Fixed Point Guessing - (2 points for Interval answer)
Current situation and future of Web3 in various countries