hql包名错误

本文分析了一种典型的Spring框架中出现的依赖注入失败错误,并详细解释了错误的根本原因。问题出现在StockRepository接口的updateByUnionKey方法定义不当,导致Hibernate在解析HQL时引发异常。此外,还涉及到对com.simpletour.domain.inventory.Stock类的映射问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘lineController’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘planMgtServiceImpl’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘stockBizImpl’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘stockRepository’: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract int com.simpletour.repository.inventory.StockRepository.updateByUnionKey(java.lang.Integer,com.simpletour.commons.data.entity.key.UnionKey)!

仔细看最下面有
org.hibernate.hql.internal.ast.QuerySyntaxException: com.simpletour.domain.inventory.Stock is not mapped

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值