Commit bd719c13 authored by Dave Syer's avatar Dave Syer

Nest the @EnableWebSecurity so it can be added to a condition

parent 761c2dab
......@@ -96,8 +96,7 @@ import org.springframework.security.web.util.matcher.AnyRequestMatcher;
*/
@Configuration
@ConditionalOnClass({ EnableWebSecurity.class })
// @ConditionalOnMissingBean(SecurityAutoConfiguration.class)
@EnableWebSecurity
@ConditionalOnMissingBean(annotation = EnableWebSecurity.class)
@EnableConfigurationProperties
public class SecurityAutoConfiguration {
......@@ -137,6 +136,7 @@ public class SecurityAutoConfiguration {
// Get the ignored paths in early
@Order(Ordered.HIGHEST_PRECEDENCE)
@EnableWebSecurity
private static class IgnoredPathsWebSecurityConfigurerAdapter implements
SecurityConfigurer<Filter, WebSecurity> {
......
......@@ -17,7 +17,6 @@
package org.springframework.boot.actuate.autoconfigure;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration;
......@@ -28,7 +27,6 @@ import org.springframework.context.ConfigurableApplicationContext;
* @author Dave Syer
*
*/
@Ignore("Unignore me when security configuration can be made conditional")
public class SpringApplicationHierarchyTests {
private ConfigurableApplicationContext context;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment