NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined

前端 未结 2 1896
清歌不尽
清歌不尽 2020-12-21 02:07

I have simple Spring 4 WebMVC app (Java-config), and I want to add JPA. But when I try to run app (as deloyed on Tomcat) I get: What can be a source of error?

2条回答
  •  半阙折子戏
    2020-12-21 02:50

    in this question I posted a full example how to unit test a spring controller which needs an autowired JpaRepository.

提交回复
热议问题