forked from spring-projects/spring-webflow-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace web.xml with Java configuration in booking-mvc
- Loading branch information
1 parent
fa38668
commit e0ed2a6
Showing
4 changed files
with
47 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...java/org/springframework/webflow/samples/booking/config/DispatcherServletInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() }; | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
...org/springframework/webflow/samples/booking/config/SecurityWebApplicationInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} |
This file was deleted.
Oops, something went wrong.