Merge branch '1.5.x'
This commit is contained in:
@@ -43,9 +43,11 @@ import org.springframework.context.annotation.Condition;
|
||||
* }
|
||||
* </pre>
|
||||
* <p>
|
||||
* The {@link ConfigurationPhase} should be specified according to the conditions that
|
||||
* are defined. In the example above, all conditions are static and can be evaluated
|
||||
* early so {@code PARSE_CONFIGURATION} is a right fit.
|
||||
* The
|
||||
* {@link org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase
|
||||
* ConfigurationPhase} should be specified according to the conditions that are defined.
|
||||
* In the example above, all conditions are static and can be evaluated early so
|
||||
* {@code PARSE_CONFIGURATION} is a right fit.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.3.0
|
||||
|
||||
@@ -45,9 +45,11 @@ import org.springframework.core.annotation.Order;
|
||||
* }
|
||||
* </pre>
|
||||
* <p>
|
||||
* The {@link ConfigurationPhase} should be specified according to the conditions that
|
||||
* are defined. In the example above, all conditions are static and can be evaluated
|
||||
* early so {@code PARSE_CONFIGURATION} is a right fit.
|
||||
* The
|
||||
* {@link org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase
|
||||
* ConfigurationPhase} should be specified according to the conditions that are defined.
|
||||
* In the example above, all conditions are static and can be evaluated early so
|
||||
* {@code PARSE_CONFIGURATION} is a right fit.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.2.0
|
||||
|
||||
@@ -43,9 +43,11 @@ import org.springframework.context.annotation.Condition;
|
||||
* }
|
||||
* </pre>
|
||||
* <p>
|
||||
* The {@link ConfigurationPhase} should be specified according to the conditions that
|
||||
* are defined. In the example above, all conditions are static and can be evaluated
|
||||
* early so {@code PARSE_CONFIGURATION} is a right fit.
|
||||
* The
|
||||
* {@link org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase
|
||||
* ConfigurationPhase} should be specified according to the conditions that are defined.
|
||||
* In the example above, all conditions are static and can be evaluated early so
|
||||
* {@code PARSE_CONFIGURATION} is a right fit.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.3.0
|
||||
|
||||
@@ -270,18 +270,18 @@ public class ResourceServerTokenServicesConfigurationTests {
|
||||
.of("security.oauth2.resource.jwk.key-set-uri=http://my-auth-server/token_keys")
|
||||
.applyTo(this.environment);
|
||||
this.context = new SpringApplicationBuilder(JwkTokenStoreConfiguration.class,
|
||||
ResourceConfiguration.class)
|
||||
.environment(this.environment).web(false).run();
|
||||
ResourceConfiguration.class).environment(this.environment).web(false)
|
||||
.run();
|
||||
assertThat(this.context.getBeansOfType(JwkTokenStore.class)).hasSize(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void jwtTokenStoreShouldBeConditionalOnMissingBean() throws Exception {
|
||||
TestPropertyValues
|
||||
.of("security.oauth2.resource.jwt.keyValue=" + PUBLIC_KEY)
|
||||
TestPropertyValues.of("security.oauth2.resource.jwt.keyValue=" + PUBLIC_KEY)
|
||||
.applyTo(this.environment);
|
||||
this.context = new SpringApplicationBuilder(JwtTokenStoreConfiguration.class, ResourceConfiguration.class)
|
||||
.environment(this.environment).web(false).run();
|
||||
this.context = new SpringApplicationBuilder(JwtTokenStoreConfiguration.class,
|
||||
ResourceConfiguration.class).environment(this.environment).web(false)
|
||||
.run();
|
||||
assertThat(this.context.getBeansOfType(JwtTokenStore.class)).hasSize(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user