为了账号安全,请及时绑定邮箱和手机立即绑定

这是什么错呀,老师,没有引错包,还是找不到实体


严重: Servlet.service() for servlet [SpringMVC] in context with path [/SSH2] threw exception [Request processing failed; nested exception is org.hibernate.MappingException: Unknown entity: Person.class] with root cause

org.hibernate.MappingException: Unknown entity: Person.class

at org.hibernate.internal.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:1096)

at org.hibernate.internal.SessionImpl.getOuterJoinLoadable(SessionImpl.java:1758)

at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1663)

at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:380)

at com.imooc.ssh.dao.PersonDao.getPerson(PersonDao.java:30)

at com.imooc.ssh.service.PersonService.getPerson(PersonService.java:21)

at com.imooc.ssh.service.PersonService$$FastClassBySpringCGLIB$$e55347e5.invoke(<generated>)

at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)

at com.imooc.ssh.service.PersonService$$EnhancerBySpringCGLIB$$cd70b298.getPerson(<generated>)

at com.imooc.ssh.controller.PersonController.getPerson(PersonController.java:27)

这是什么错呀,包也没引错



正在回答

2 回答

或许忘记写注解了?

0 回复 有任何疑惑可以回复我~

PersonService.java:21  这个类的21行有错,去看一下

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

这是什么错呀,老师,没有引错包,还是找不到实体

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信