Spring 3.1 + Hibernate 4.1 JPA, Entity manager factory is registered twice

后端 未结 2 673
我在风中等你
我在风中等你 2020-12-09 12:23

I\'m using Spring Framework 3.1 with Hibernate 4.1 as a JPA provider, and I have a fully functional setup, but every time the web app is started I see this warning message:<

2条回答
  •  执笔经年
    2020-12-09 12:54

    How are you initializing your Spring Application Context? Are you using Spring MVC?

    I've seen sometimes Spring MVC XML configurations importing the other app. context XML, causing instancing twice some beans because they are declared in the application context and the web application context.

提交回复
热议问题