-
Dec 9th, 2009, 10:10 AM
#1
JavaConfig in Spring 3.0 RC3 issue
Since some core features from the JavaConfig project have been added to the Spring Framework 3.0 now, I am trying to config javaconfig in a web project I am working on. Since Spring 3.0 already include some of the javaconfig, I did not include the org.springframework.config.java-1.0.0.M4.jar in the lib.
The question is how do I config web.xml with Spring 3.0. It seemed that Spring 3.0 does not have a JavaConfigWebApplicationContext which I can init the spring application context. I think I suppose to set it up like below(this was found on the javaconfig project documentation):
<context-param>
<param-name>contextClass</param-name>
<param-value>
org.springframework.config.java.context.JavaConfig WebApplicationContext
</param-value>
</context-param>
<!-- Configuration locations must consist of one or more comma- or space-delimited
fully-qualified @Configuration classes -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>com.company.config.JavaConfig</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListe ner
</listener-class>
</listener>
But in Spring 3.0 there is no org.springframework.config.java.context.JavaConfig WebApplicationContext. Any idea how to config javaconfig within Spring 3.0 in a web project?
Thanks!
Last edited by ouyanone; Dec 9th, 2009 at 10:30 AM.
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