Merge pull request #10025 from kwoyke/JAVA-2404

JAVA-2404: Fix Spring MVC and Security config
This commit is contained in:
Dhawal Kapil 2020-09-15 20:18:51 +05:30 committed by GitHub
commit b3e76be0aa
2 changed files with 15 additions and 15 deletions

View File

@ -12,7 +12,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.view.InternalResourceViewResolver; import org.springframework.web.servlet.view.InternalResourceViewResolver;
@Configuration @Configuration
@ComponentScan("com.baeldung.web") @ComponentScan("com.baeldung")
@EnableWebMvc @EnableWebMvc
@EnableAsync @EnableAsync
public class WebConfig implements WebMvcConfigurer { public class WebConfig implements WebMvcConfigurer {

View File

@ -20,9 +20,9 @@
<param-value>com.baeldung.spring</param-value> <param-value>com.baeldung.spring</param-value>
</context-param> </context-param>
<listener> <!-- <listener>-->
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <!-- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>-->
</listener> <!-- </listener>-->
<!-- Spring child --> <!-- Spring child -->
<servlet> <servlet>
@ -40,17 +40,17 @@
</servlet-mapping> </servlet-mapping>
<!-- Spring Security --> <!-- Spring Security -->
<filter> <!-- <filter>-->
<filter-name>springSecurityFilterChain</filter-name> <!-- <filter-name>springSecurityFilterChain</filter-name>-->
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> <!-- <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>-->
<async-supported>true</async-supported> <!-- <async-supported>true</async-supported>-->
</filter> <!-- </filter>-->
<filter-mapping> <!-- <filter-mapping>-->
<filter-name>springSecurityFilterChain</filter-name> <!-- <filter-name>springSecurityFilterChain</filter-name>-->
<url-pattern>/*</url-pattern> <!-- <url-pattern>/*</url-pattern>-->
<dispatcher>REQUEST</dispatcher> <!-- <dispatcher>REQUEST</dispatcher>-->
<dispatcher>ASYNC</dispatcher> <!-- <dispatcher>ASYNC</dispatcher>-->
</filter-mapping> <!-- </filter-mapping>-->
<!-- <welcome-file-list> --> <!-- <welcome-file-list> -->
<!-- <welcome-file>index.html</welcome-file> --> <!-- <welcome-file>index.html</welcome-file> -->