Skip to content

Commit

Permalink
Replace web.xml with Java configuration in booking-mvc
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoyanchev committed Feb 26, 2014
1 parent fa38668 commit e0ed2a6
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 62 deletions.
4 changes: 2 additions & 2 deletions booking-mvc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package org.springframework.webflow.samples.booking.config;

import javax.servlet.Filter;

import org.springframework.web.filter.HiddenHttpMethodFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class DispatcherServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {

@Override
protected Class<?>[] getRootConfigClasses() {
return new Class<?>[] {
SecurityConfig.class,
DataAccessConfig.class,
WebMvcConfig.class,
WebFlowConfig.class
};
}

@Override
protected Class<?>[] getServletConfigClasses() {
return null;
}

@Override
protected String[] getServletMappings() {
return new String[] { "/" };
}

@Override
protected Filter[] getServletFilters() {
return new Filter[] { new HiddenHttpMethodFilter() };
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.springframework.webflow.samples.booking.config;

import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;

/**
* ServletContext initializer for Spring Security specific configuration such as
* the chain of Spring Security filters.
*/
public class SecurityWebApplicationInitializer extends AbstractSecurityWebApplicationInitializer {
}
60 changes: 0 additions & 60 deletions booking-mvc/src/main/webapp/WEB-INF/web.xml

This file was deleted.

0 comments on commit e0ed2a6

Please sign in to comment.