Skip to content

Commit

Permalink
only include imports which are actually required for spring-cloud Cli…
Browse files Browse the repository at this point in the history
…entConfiguration generator (closes swagger-api#6683)
  • Loading branch information
felhag committed Jun 20, 2023
1 parent a620537 commit 455fd3d
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
{{#authMethods}}
{{#isOAuth}}
import org.springframework.cloud.security.oauth2.client.feign.OAuth2FeignRequestInterceptor;
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext;
import org.springframework.security.oauth2.client.resource.BaseOAuth2ProtectedResourceDetails;
{{/isOAuth}}
{{#isApplication}}
import org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails;
{{/isApplication}}
{{#isCode}}
import org.springframework.security.oauth2.client.token.grant.code.AuthorizationCodeResourceDetails;
{{/isCode}}
{{#isImplicit}}
import org.springframework.security.oauth2.client.token.grant.implicit.ImplicitResourceDetails;
{{/isImplicit}
{{#isPassword}}
import org.springframework.security.oauth2.client.token.grant.password.ResourceOwnerPasswordResourceDetails;
import org.springframework.security.oauth2.common.exceptions.InvalidGrantException;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
{{/isPassword}}

@Configuration
@EnableConfigurationProperties
Expand Down

0 comments on commit 455fd3d

Please sign in to comment.