XXX is not mapped

这个问题绊了我两次跟头,作为一个3年多开发经验的人,甚是尴尬

java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: SmsTemplate is not mapped [select o from SmsTemplate o where o.templateCode = ?1 and o.disabled = ?2]

此问题为找不到映射文件,

解决方式为:在persistence.xml中配置SmsTemplate的PO路径!!!!!

我要罚自己喝完两大杯水

原文地址:https://www.cnblogs.com/yinyl/p/9791127.html