diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/WebSecurityConfig.java b/spring-security-mvc-boot/src/main/java/org/baeldung/voter/WebSecurityConfig.java index 495567c7b2..06fb4d2316 100644 --- a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/WebSecurityConfig.java +++ b/spring-security-mvc-boot/src/main/java/org/baeldung/voter/WebSecurityConfig.java @@ -18,8 +18,8 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import java.util.Arrays; import java.util.List; -//@Configuration -//@EnableWebSecurity +@Configuration +@EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/XmlSecurityConfig.java b/spring-security-mvc-boot/src/main/java/org/baeldung/voter/XmlSecurityConfig.java index 124513d317..bee1381778 100644 --- a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/XmlSecurityConfig.java +++ b/spring-security-mvc-boot/src/main/java/org/baeldung/voter/XmlSecurityConfig.java @@ -6,8 +6,8 @@ import org.springframework.context.annotation.ImportResource; /** * Created by ambrusadrianz on 09/10/2016. */ -@Configuration -@ImportResource({ "classpath:spring-security.xml" }) +//@Configuration +//@ImportResource({ "classpath:spring-security-custom-voter.xml" }) public class XmlSecurityConfig { public XmlSecurityConfig() { super(); diff --git a/spring-security-mvc-boot/src/main/resources/spring-security.xml b/spring-security-mvc-boot/src/main/resources/spring-security-custom-voter.xml similarity index 99% rename from spring-security-mvc-boot/src/main/resources/spring-security.xml rename to spring-security-mvc-boot/src/main/resources/spring-security-custom-voter.xml index 83bc14dda7..0b334a3694 100644 --- a/spring-security-mvc-boot/src/main/resources/spring-security.xml +++ b/spring-security-mvc-boot/src/main/resources/spring-security-custom-voter.xml @@ -4,7 +4,7 @@ xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation=" http://www.springframework.org/schema/security - http://www.springframework.org/schema/security/spring-security-4.2.xsd + http://www.springframework.org/schema/security/spring-security.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">