Announcement Announcement Module
No announcement yet.
Spring 3.2 Java Config Example Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3.2 Java Config Example

    I'm was looking at moving away from the xml config and removing web.xml elements and wanted to see if someone has a good example of how to configure the Spring WS @Bean and also the servlet elements in the WebApplicationInitializer code. If this is not possible right now I can create a JIRA enhancement request to see if this can be added in a future release.


  • #2
    I worked a little with support on this one and right now MessageDispatcherServlet does not have a way of passing in rgw root context. For the normal Spring MVC DispatcherServlet there is a constructor with a WebApplicationContext parameter (added in 3.1.x I believe) and the 'root' app context can be passed on using this parameter.

    However it looks like you can use the web.xml to bootstrap the ability to support other JavaConfig classes if you want like me to still have the persistance and service logic as pure Java configuration. There is the syntax of this below and I'll open a request to enhance this support if a future release.

    <servlet-class> eDispatcherServlet</servlet-class>
    <param-value> ConfigWebApplicationContext
    <param-value> roach.SpringWSConfig</param-value>