mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-16 12:55:50 +00:00
integrate dandelion config for Servlet 2 compatibility
This commit is contained in:
parent
95e8b64a5a
commit
bf41a4b4ed
1 changed files with 39 additions and 15 deletions
|
@ -2,7 +2,7 @@
|
||||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||||
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||||
id="WebApp_ID" version="2.5">
|
id="WebApp_ID" version="2.5">
|
||||||
|
|
||||||
<display-name>Spring PetClinic</display-name>
|
<display-name>Spring PetClinic</display-name>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>spring.profiles.active</param-name>
|
<param-name>spring.profiles.active</param-name>
|
||||||
<param-value>jpa</param-value>
|
<param-value>jdbc</param-value>
|
||||||
<!-- Available profiles:
|
<!-- Available profiles:
|
||||||
<param-value>jdbc</param-value>
|
<param-value>jdbc</param-value>
|
||||||
<param-value>jpa</param-value> (in the case of plain JPA)
|
<param-value>jpa</param-value> (in the case of plain JPA)
|
||||||
|
@ -19,12 +19,12 @@
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
- Location of the XML file that defines the root application context.
|
- Location of the XML file that defines the root application context.
|
||||||
- Applied by ContextLoaderServlet.
|
- Applied by ContextLoaderServlet.
|
||||||
-->
|
-->
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>contextConfigLocation</param-name>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<param-value>classpath:spring/business-config.xml, classpath:spring/tools-config.xml</param-value>
|
<param-value>classpath:spring/dao-config.xml, classpath:spring/tools-config.xml</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
<listener>
|
<listener>
|
||||||
|
@ -32,8 +32,8 @@
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
- Servlet that dispatches request to registered handlers (Controller implementations).
|
- Servlet that dispatches request to registered handlers (Controller implementations).
|
||||||
-->
|
-->
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>petclinic</servlet-name>
|
<servlet-name>petclinic</servlet-name>
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||||
|
@ -49,9 +49,33 @@
|
||||||
<url-pattern>/</url-pattern>
|
<url-pattern>/</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Dandelion-Datatables servlet definition -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>datatablesController</servlet-name>
|
||||||
|
<servlet-class>com.github.dandelion.datatables.extras.servlet2.servlet.DatatablesServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<!-- Dandelion-Datatables servlet mapping -->
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>datatablesController</servlet-name>
|
||||||
|
<url-pattern>/datatablesController/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Dandelion-Datatables filter definition -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>datatablesFilter</filter-name>
|
||||||
|
<filter-class>com.github.dandelion.datatables.extras.servlet2.filter.DatatablesFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
<!-- Dandelion-Datatables filter mapping -->
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>datatablesFilter</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
<!-- used so we can use forms of method type 'PUT' and 'DELETE'
|
<!-- used so we can use forms of method type 'PUT' and 'DELETE'
|
||||||
see here: http://static.springsource.org/spring/docs/current/spring-framework-reference/html/view.html#rest-method-conversion
|
see here: http://static.springsource.org/spring/docs/current/spring-framework-reference/html/view.html#rest-method-conversion
|
||||||
-->
|
-->
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>httpMethodFilter</filter-name>
|
<filter-name>httpMethodFilter</filter-name>
|
||||||
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
|
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
|
||||||
|
|
Loading…
Reference in a new issue