spring-data-rest-webmvc 2.0.0 - RepositoryRestExporterServlet missing -


i'm trying create rest web service spring-data-rest-webmvc 2.0.0. i'm following handbook "spring in practice" use version 1.0.0. in handbook, define exporter servlet in web.xml below:

<web-app ...>     ...     <servlet>         <servlet-name>api</servlet-name>         <servlet-class>org.springframework.data.rest.webmvc.repositoryrestexporterservlet</servlet-class>         <load-on-startup>1</load-on-startup>     </servlet>     <servlet-mapping>         <servlet-name>api</servlet-name>         <url-pattern>/api/*</url-pattern>     </servlet-mapping> </web-app> 

in version 2.0.0, can not find repositoryrestexporterservlet class. dispatcher servlet should use? can examples? thanks

you can add

 <bean class="org.springframework.data.rest.webmvc.config.repositoryrestmvcconfiguration"/> 

to regular spring-mvc-servlet.xml config , can use both rest servlet , spring mvc servlet.

otherwise, sdr 2, should use:

org.springframework.data.rest.webmvc.repositoryrestdispatcherservlet

in web.xml


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -