@EnableOAuth2*
This commit is contained in:
@@ -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");
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user