当前位置:网站首页>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
边栏推荐
- Current situation and future of Web3 in various countries
- Gbase 8C system table PG_ database
- cvpr2022去雨去雾
- Leetcode (540) -- a single element in an ordered array
- GBase 8c 函数/存储过程参数(二)
- 詳細些介紹如何通過MQTT協議和華為雲物聯網進行通信
- Awk from introduction to earth (0) overview of awk
- 4. Classes and objects
- Flink CDC mongoDB 使用及Flink sql解析monggo中复杂嵌套JSON数据实现
- Restcloud ETL cross database data aggregation operation
猜你喜欢
MATLAB小技巧(24)RBF,GRNN,PNN-神经网络
错误Invalid bound statement (not found): com.ruoyi.stock.mapper.StockDetailMapper.xxxx解决
通达OA v12流程中心
8 free, HD, copyright free video material download websites are recommended
Return a tree structure data
RestCloud ETL 跨库数据聚合运算
easyPOI
awk从入门到入土(0)awk概述
【翻译】后台项目加入了CNCF孵化器
[shutter] bottom navigation bar implementation (bottomnavigationbar bottom navigation bar | bottomnavigationbaritem navigation bar entry | pageview)
随机推荐
Gbase 8C system table PG_ constraint
【ROS进阶篇】第六讲 ROS中的录制与回放(rosbag)
Qt之QComboBox添加QCheckBox(下拉列表框插入复选框,含源码+注释)
Iptables layer 4 forwarding
【翻译】Flux安全。通过模糊处理获得更多信心
4. Classes and objects
[Hcia]No.15 Vlan间通信
Thread safe singleton mode
elastic stack
Gbase 8C trigger (II)
GBase 8c系统表pg_cast
Create + register sub apps_ Define routes, global routes and sub routes
Cfdiv2 Fixed Point Guessing - (2 points for Interval answer)
stm32F407-------ADC
Kotlin middle process understanding and Practice (I)
Cancellation of collaboration in kotlin, side effects of cancellation and overtime tasks
COM和CN
詳細些介紹如何通過MQTT協議和華為雲物聯網進行通信
Flink CDC mongoDB 使用及Flink sql解析monggo中复杂嵌套JSON数据实现
Simple understanding of SVG