diff --git a/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/CloudfoundryResourceCompilerAutoConfiguration.java b/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/OAuth2ResourceCompilerAutoConfiguration.java similarity index 86% rename from spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/CloudfoundryResourceCompilerAutoConfiguration.java rename to spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/OAuth2ResourceCompilerAutoConfiguration.java index bc56e8e..cc6b531 100644 --- a/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/CloudfoundryResourceCompilerAutoConfiguration.java +++ b/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/OAuth2ResourceCompilerAutoConfiguration.java @@ -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"); } diff --git a/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/CloudfoundrySsoCompilerAutoConfiguration.java b/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/OAuth2SsoCompilerAutoConfiguration.java similarity index 80% rename from spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/CloudfoundrySsoCompilerAutoConfiguration.java rename to spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/OAuth2SsoCompilerAutoConfiguration.java index 1647900..a750e27 100644 --- a/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/CloudfoundrySsoCompilerAutoConfiguration.java +++ b/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/OAuth2SsoCompilerAutoConfiguration.java @@ -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"); } } diff --git a/spring-cloud-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration b/spring-cloud-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration index f353dc0..6d91940 100644 --- a/spring-cloud-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration +++ b/spring-cloud-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration @@ -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