Home  >  Forum  >  Spring
Post New Query

Difference between Spring @EnableWebSecurity and @EnableWebMvcSecurity



Asked on May 13, 2015
What is difference  between  @EnableWebSecurity and @EnableWebMvcSecurity in spring security?


Replied on May 20, 2015
1. @EnableWebSecurity and @EnableWebMvcSecurity both has been introduced in Spring 3.2 and is applied in configuration class. 

2. @EnableWebSecurity annotation enables spring security configuration defined in WebSecurityConfigurer. 

3. @EnableWebMvcSecurity provides spring security configuration for spring MVC. 

4. Spring 4 has deprecated @EnableWebMvcSecurity.

5. The functionality of @EnableWebMvcSecurity can be achieved by @EnableWebSecurity.


Write Answer








©2019 concretepage.com | Privacy Policy | Contact Us