spring-guides/gs-authenticating-ldap

Missing annotation from guide

djnoddyp opened this issue · 2 comments

In the guide @EnableWebSecurity is missing from WebSecurityConfig.java, without this the login doesn't work.

I was following the guide but mine is a an MVC app as opposed to REST, not sure if that makes any difference.

dsyer commented

Works for me (and Spring Boot does not require the use of @EnableWebSecurity). What is it that you see not working, and how do you know?

Thanks, @djnoddyp for the report! The annotation isn't necessary in a Spring Boot application, though the WebSecurityConfigurerAdapter still needs to be scanned, which is why @Configuration takes its place.

The guide certainly works, as proven by the unit tests that accompany the completed version. Are you recommending some other kind of change? If so, please feel free to open the ticket so we can make the necessary changes.