mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-29 22:59:38 +00:00
removed unneeded declarations inside web.xml
This commit is contained in:
parent
0c2408390e
commit
4cd69795d2
1 changed files with 10 additions and 78 deletions
|
@ -18,6 +18,10 @@
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>spring.profiles.active</param-name>
|
<param-name>spring.profiles.active</param-name>
|
||||||
<param-value>jdbc</param-value>
|
<param-value>jdbc</param-value>
|
||||||
|
<!-- you can replace the above param with:
|
||||||
|
<param-value>jpa,plain-jpa</param-value> (in the case of plain JPA)
|
||||||
|
<param-value>jpa,spring-data</param-value> (in the case of Spring Data JPA)
|
||||||
|
-->
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -26,26 +30,16 @@
|
||||||
-->
|
-->
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>log4jConfigLocation</param-name>
|
<param-name>log4jConfigLocation</param-name>
|
||||||
<param-value>/WEB-INF/classes/log4j.properties</param-value>
|
<param-value>/WEB-INF/classes/log4j.xml</param-value>
|
||||||
</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.
|
||||||
-
|
|
||||||
- Can be set to:
|
|
||||||
- "/WEB-INF/applicationContext-hibernate.xml" for the Hibernate implementation,
|
|
||||||
- "/WEB-INF/applicationContext-jpa.xml" for the JPA one, or
|
|
||||||
- "/WEB-INF/applicationContext-jdbc.xml" for the JDBC one.
|
|
||||||
-->
|
-->
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>contextConfigLocation</param-name>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<param-value>classpath:spring/applicationContext-dao.xml</param-value>
|
<param-value>classpath:spring/applicationContext-dao.xml</param-value>
|
||||||
<!--
|
|
||||||
<param-value>/WEB-INF/spring/applicationContext-hibernate.xml</param-value>
|
|
||||||
<param-value>/WEB-INF/spring/applicationContext-jpa.xml</param-value>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
To use the JPA variant above, you will need to enable Spring load-time
|
To use the JPA variant above, you will need to enable Spring load-time
|
||||||
weaving in your server environment. Out of the box, Spring will try to
|
weaving in your server environment. Out of the box, Spring will try to
|
||||||
|
@ -54,6 +48,10 @@
|
||||||
See PetClinic's readme and/or Spring's JPA documentation for more information.
|
See PetClinic's readme and/or Spring's JPA documentation for more information.
|
||||||
-->
|
-->
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
|
<listener>
|
||||||
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||||
|
</listener>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
- Configures Log4J for this web app.
|
- Configures Log4J for this web app.
|
||||||
|
@ -73,54 +71,6 @@
|
||||||
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
|
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
|
||||||
- Loads the root application context of this web app at startup,
|
|
||||||
- by default from "/WEB-INF/applicationContext.xml".
|
|
||||||
- Note that you need to fall back to Spring's ContextLoaderServlet for
|
|
||||||
- J2EE servers that do not follow the Servlet 2.4 initialization order.
|
|
||||||
-
|
|
||||||
- Use WebApplicationContextUtils.getWebApplicationContext(servletContext)
|
|
||||||
- to access it anywhere in the web application, outside of the framework.
|
|
||||||
-
|
|
||||||
- The root context is the parent of all servlet-specific contexts.
|
|
||||||
- This means that its beans are automatically available in these child contexts,
|
|
||||||
- both for getBean(name) calls and (external) bean references.
|
|
||||||
-->
|
|
||||||
<listener>
|
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
|
||||||
</listener>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Defines the 'default' servlet (usually for service static resources).
|
|
||||||
Uncomment this in containers (GlassFish) that do not declare this
|
|
||||||
implicit definition out of the box, or change the name of the servlet mapping
|
|
||||||
below to the appropriate one.
|
|
||||||
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>default</servlet-name>
|
|
||||||
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>debug</param-name>
|
|
||||||
<param-value>0</param-value>
|
|
||||||
</init-param>
|
|
||||||
<init-param>
|
|
||||||
<param-name>listings</param-name>
|
|
||||||
<param-value>false</param-value>
|
|
||||||
</init-param>
|
|
||||||
<load-on-startup>1</load-on-startup>
|
|
||||||
</servlet>
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
- Map static resources to the default servlet
|
|
||||||
- examples:
|
|
||||||
- http://localhost:8080/static/images/pets.png
|
|
||||||
- http://localhost:8080/static/styles/petclinic.css
|
|
||||||
-->
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>default</servlet-name>
|
|
||||||
<url-pattern>/static/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
- Servlet that dispatches request to registered handlers (Controller implementations).
|
- Servlet that dispatches request to registered handlers (Controller implementations).
|
||||||
|
@ -134,7 +84,7 @@
|
||||||
<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>
|
||||||
<load-on-startup>2</load-on-startup>
|
<load-on-startup>1</load-on-startup>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -163,23 +113,5 @@
|
||||||
<session-config>
|
<session-config>
|
||||||
<session-timeout>10</session-timeout>
|
<session-timeout>10</session-timeout>
|
||||||
</session-config>
|
</session-config>
|
||||||
|
|
||||||
<!-- eliminate welcome files -->
|
|
||||||
<!-- useful for Servlet 3 container (Tomcat 7 and Jetty 6) -->
|
|
||||||
<welcome-file-list>
|
|
||||||
<welcome-file></welcome-file>
|
|
||||||
</welcome-file-list>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
- Reference to PetClinic database.
|
|
||||||
- Only needed if not using a local DataSource but a JNDI one instead.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<resource-ref>
|
|
||||||
<res-ref-name>jdbc/petclinic</res-ref-name>
|
|
||||||
<res-type>javax.sql.DataSource</res-type>
|
|
||||||
<res-auth>Container</res-auth>
|
|
||||||
</resource-ref>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</web-app>
|
</web-app>
|
Loading…
Reference in a new issue