Hi I am using Mockito to test my Spring-REST services , now when i try to run the junit it gives me the following exception
Cannot create inner bean '(inner bean)' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined
when i simply run my applicaiton i am not getting this exception but when i run my Junit i get this error , Please help.
Aucun commentaire:
Enregistrer un commentaire