[Bug0030] 修改*.xml后,target下的*.xml文件没有更新

1、问题

关联问题(不过关联问题是containerId字段在xml中写错了,应该写container_id)

### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column 'containerId' in 'where clause' 
### The error may exist in file [F:\ProDocument\xxx\xxx\xxx\target\classes\mapper\xxx\xxxMapper.xml] 
### The error may involve com.ruoyi.xxx.mapper.xxxMapper.selectxxxLocatorList-Inline 
### The error occurred while setting parameters 
### SQL: select id, locator_code, locator_name, container_code, locator_seat, locator_sort, locator_status, create_by, create_time, update_by, update_time, del_flag, remark, equipment_number, tenant_id, use_weight, warehouse_location_id, container_id, equipment_id from smsc_locator WHERE containerId in ( ? ) 
### Cause: java.sql.SQLSyntaxErrorException: Unknown column 'containerId' in 'where clause' ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column 'containerId' in 'where clause'

相关类似问题

Annotation-specified bean name.. for bean class ...

clean项目 如果不行就重启(我是重启解决的)

2、场景

若依框架 + Maven项目,xml语句写错了,发现报错去修改,然后重启项目依然报错,于是我就留意一下 target 文件夹

3、原因

target的*.xml文件没有更新

项目编译后会修改target中的内容,如果只删除了代码的java类,而没有删除target中的class,此时编译也会报错;删除target中多余的class类即可。

4、解决方案

Idea2021.3右侧 maven 工具栏,执行clean,再install。之后便可以在target文件夹下找到相关的*.xml文件,重新运行项目,访问成功。

不过每次都要这样重启项目似乎略显麻烦。

待优化

IDEA中target文件夹不自动更新可能存在的原因

1

2

Idea没有自动更新target目录

优秀参考文章

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

CodeRain程序雨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值