這是什么錯呀,老師,沒有引錯包,還是找不到實體
嚴重: 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)
這是什么錯呀,包也沒引錯
2019-05-12
或許忘記寫注解了?
2018-11-14
PersonService.java:21? 這個類的21行有錯,去看一下