Announcement Announcement Module
Collapse
No announcement yet.
Configuration example for Servlet 2.5 environment Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuration example for Servlet 2.5 environment

    I have been using SPRING DATA JPA 1.5.0.RELEASE and it really works well.
    Now, I would like to use SPRING DATA REST in a servlet 2.5 but I am blocked on "Configuring Spring Data REST".

    The documentation mentions that "
    The equivalent of the above in a standard web.xml will also work identically to this configuration if you are still in a servlet 2.5 environment.
    " ... as if there is a mathematical transformation that takes you from the Java config to the XML config.

    Would it be feasible to provide a sample web.xml explicitly?

    Thank you very much.

  • #2
    In the end it is quite simple when you know it

    On top of the traditional SPRING MVC configuration in web.xml (i.e. context loader listener + mvc context), the only thing to do is to add a bean in the MVC context:
    <beanid="repositoryRestMvcConfiguration"
    class="org.springframework.data.rest.webmvc.config.Repos itoryRestMvcConfiguration"/>
    Last edited by adelinor; Apr 10th, 2014, 09:22 AM.

    Comment

    Working...
    X