-
Oct 16th, 2011, 02:06 PM
#1
Mixing configuration schemes...
I need to mix Configuration schemes in my web.xml. I have this
<context-param>
<param-name>contextClass</param-name>
<param-value>org.springframework.web.context.support.Anno tationConfigWebApplicationContext</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:META-INF/spring/applicationContext*.xml
<!-- Location of Java @Configuration classes that configure the components that makeup this application -->
com.foo.config</param-value>
</context-param>
My applicationContext still references Spring 3.0.xsd...
However, when I run it, I get an error
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'fooListController': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but found 0
Any ideas on how to mix definitions in applicationContext.xml and @Configuration classes
-
Oct 16th, 2011, 02:16 PM
#2
I am using Spring 3.1.0.M2
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules