8000 fix(spring): add AutoConfigureAfter annotation by emmileaf · Pull Request #1208 · googleapis/sdk-platform-java · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@emmileaf
Copy link
Contributor
@emmileaf emmileaf commented Jan 4, 2023

This PR adds AutoConfigureAfter(GcpContextAutoConfiguration.class) annotation to enforce configuration order. It also makes two related changes to enable this annotation:

@sonarqubecloud
Copy link
sonarqubecloud bot commented Jan 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@emmileaf emmileaf added the spring pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch. label Jan 4, 2023
@emmileaf emmileaf marked this pull request as ready for review January 4, 2023 15:15
@emmileaf emmileaf requested a review from a team as a code owner January 4, 2023 15:15
Copy link
Contributor
@zhumin8 zhumin8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Override
public void visit(AnnotationNode annotation) {
annotation.type().accept(this);
if (annotation.descriptionExprs() != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, Good catch! I guess we missed this and just got lucky with

@ConditionalOnClass(EchoClient.class)
@EnableConfigurationProperties(EchoSpringProperties.class)

emmileaf added a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Jan 6, 2023
This goes together with googleapis/sdk-platform-java#1208 in switching generator dependency from spring-cloud-gcp-core to spring-cloud-gcp-autoconfigure.
@emmileaf emmileaf merged commit 9b7336d into autoconfig-gen-draft2 Jan 6, 2023
@emmileaf emmileaf deleted the spring-add-annotation branch January 6, 2023 14:45
diegomarquezp pushed a commit to GoogleCloudPlatform/spring-cloud-gcp that referenced this pull request Jan 20, 2023
This goes together with googleapis/sdk-platform-java#1208 in switching generator dependency from spring-cloud-gcp-core to spring-cloud-gcp-autoconfigure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spring pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0