@EnableOAuth2*

This commit is contained in:
Dave Syer
2014-09-01 08:17:23 +01:00
parent 90c66b9208
commit 35bf0e0124
3 changed files with 10 additions and 9 deletions

View File

@@ -26,18 +26,18 @@ import org.springframework.boot.cli.compiler.DependencyCustomizer;
* @author Dave Syer
*
*/
public class CloudfoundryResourceCompilerAutoConfiguration extends CompilerAutoConfiguration {
public class OAuth2ResourceCompilerAutoConfiguration extends CompilerAutoConfiguration {
@Override
public boolean matches(ClassNode classNode) {
return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableCloudfoundryResource");
return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableOAuth2Resource");
}
@Override
public void applyDependencies(DependencyCustomizer dependencies) {
dependencies
.ifAnyMissingClasses(
"org.springframework.cloud.cloudfoundry.resource.EnableCloudfoundryResource")
"org.springframework.cloud.cloudfoundry.resource.EnableOAuth2Resource")
.add("spring-cloud-starter-cloudfoundry")
.add("org.springframework.security.oauth:spring-security-oauth2:2.0.3.RELEASE");
}

View File

@@ -26,18 +26,18 @@ import org.springframework.boot.cli.compiler.DependencyCustomizer;
* @author Dave Syer
*
*/
public class CloudfoundrySsoCompilerAutoConfiguration extends CompilerAutoConfiguration {
public class OAuth2SsoCompilerAutoConfiguration extends CompilerAutoConfiguration {
@Override
public boolean matches(ClassNode classNode) {
return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableCloudfoundrySso");
return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableOAuth2Sso","EnableCloudfoundrySso");
}
@Override
public void applyDependencies(DependencyCustomizer dependencies) {
dependencies
.ifAnyMissingClasses(
"org.springframework.cloud.cloudfoundry.sso.EnableCloudfoundrySso")
"org.springframework.cloud.cloudfoundry.sso.EnableOAuth2Sso")
.add("spring-cloud-starter-cloudfoundry")
.add("org.springframework.security.oauth:spring-security-oauth2:2.0.3.RELEASE");
}
@@ -46,7 +46,8 @@ public class CloudfoundrySsoCompilerAutoConfiguration extends CompilerAutoConfig
public void applyImports(ImportCustomizer imports) throws CompilationFailedException {
imports.addImports(
"org.springframework.cloud.cloudfoundry.sso.EnableCloudfoundrySso",
"org.springframework.cloud.cloudfoundry.sso.CloudfoundrySsoConfigurerAdapter");
"org.springframework.cloud.cloudfoundry.sso.EnableOAuth2Sso",
"org.springframework.cloud.cloudfoundry.sso.OAuth2SsoConfigurerAdapter");
}
}

View File

@@ -1,7 +1,7 @@
org.springframework.cloud.cli.compiler.SpringCloudCompilerAutoConfiguration
org.springframework.cloud.cli.compiler.ConfigServerCompilerAutoConfiguration
org.springframework.cloud.cli.compiler.CloudfoundryResourceCompilerAutoConfiguration
org.springframework.cloud.cli.compiler.CloudfoundrySsoCompilerAutoConfiguration
org.springframework.cloud.cli.compiler.OAuth2ResourceCompilerAutoConfiguration
org.springframework.cloud.cli.compiler.OAuth2SsoCompilerAutoConfiguration
org.springframework.cloud.cli.compiler.EurekaClientCompilerAutoConfiguration
org.springframework.cloud.cli.compiler.HystrixCompilerAutoConfiguration
org.springframework.cloud.cli.compiler.ZuulCompilerAutoConfiguration