Skip to content

Enhance JavaDoc comments and modernize CI tooling#107

Merged
mercyblitz merged 15 commits intorelease-1.xfrom
dev-1.x
Mar 27, 2026
Merged

Enhance JavaDoc comments and modernize CI tooling#107
mercyblitz merged 15 commits intorelease-1.xfrom
dev-1.x

Conversation

@mercyblitz
Copy link
Copy Markdown
Contributor

This pull request introduces several improvements across the codebase, focusing on enhanced documentation for key classes, updates to CI/CD workflows, and dependency management. The most significant changes are the addition of detailed JavaDoc comments (with usage examples) to core classes, modernization of GitHub Actions workflows, and the introduction of Dependabot configuration for automated dependency updates.

Documentation Improvements:

  • Added comprehensive JavaDoc comments with example usages to key classes and methods in ReactiveDiscoveryClientAdapter, UnionDiscoveryClient, InMemoryServiceRegistry, and their related auto-configuration classes. This makes it easier for developers to understand and use these components. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

CI/CD Workflow Updates:

  • Updated GitHub Actions workflows to use the latest versions of actions/checkout and actions/setup-java (v5), switched Maven build steps to use the Maven wrapper (./mvnw), and ensured the wrapper script is executable.
  • Enhanced the Maven publish workflow by validating version formats, automating git tagging and GitHub release creation, and incrementing the patch version after a release. [1] [2]

Dependency and Build Tooling:

  • Added a .github/dependabot.yml file to enable automated dependency updates for Maven projects.
  • Updated the Maven wrapper to version 3.9.9, switched the distribution URL to Aliyun’s mirror, and changed the wrapper configuration for improved reliability and speed.

Minor Improvements:

  • Clarified a comment in the microsphere-spring-cloud-commons/pom.xml to specify that a dependency is for Microsphere Test.

Copilot AI and others added 15 commits March 22, 2026 06:41
Add Example Usage sections to class-level JavaDoc for UnionDiscoveryClient
and ReactiveDiscoveryClientAdapter. Add method-level JavaDoc with @param,
@return tags and Example Usage blocks for all public methods in:
- UnionDiscoveryClient (8 methods)
- ReactiveDiscoveryClientAdapter (6 methods)
- DiscoveryClientAutoConfiguration.unionDiscoveryClient()
- ReactiveDiscoveryClientAutoConfiguration.reactiveDiscoveryClientAdapter()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add class-level and method-level JavaDoc with descriptions, @param/@return
tags, and Example Usage sections to:
- RegistrationMetaData
- InMemoryServiceRegistry
- MultipleAutoServiceRegistration
- MultipleRegistration
- MultipleServiceRegistry
- SimpleAutoServiceRegistration
- SimpleServiceRegistry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add JavaDoc with @param/@return tags and Example Usage sections to methods
across 14 Java source files in the service registry module:
- ServiceRegistrationEndpointAutoConfiguration
- EventPublishingRegistrationAspect
- ServiceRegistryAutoConfiguration
- SimpleAutoServiceRegistrationAutoConfiguration
- WebFluxServiceRegistryAutoConfiguration
- WebMvcServiceRegistryAutoConfiguration
- AbstractServiceRegistrationEndpoint
- ServiceDeregistrationEndpoint
- ServiceRegistrationEndpoint
- RegistrationEvent and its four subclasses

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…files

Added method-level JavaDoc with descriptions, @param/@return tags, and
Example Usage sections in <pre>{@code ...}</pre> blocks to all specified
public methods across:
- WeightedRoundRobin (9 methods)
- TomcatFaultToleranceAutoConfiguration (1 method)
- TomcatDynamicConfigurationListener (2 methods)
- FeignClientAutoRefreshAutoConfiguration (3 methods)
- FeignClientSpecificationPostProcessor (1 method)
- AutoRefreshCapability (9 methods)
- FeignClientConfigurationChangedListener (1 method)
- FeignComponentRegistry (5 methods)
- CompositedRequestInterceptor (5 methods)
- DecoratedFeignComponent (10 methods)
- DecoratedContract (2 methods)
- DecoratedDecoder (2 methods)
- DecoratedEncoder (2 methods)
- DecoratedErrorDecoder (2 methods)
- DecoratedQueryMapEncoder (2 methods)
- DecoratedRetryer (3 methods)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…to-class-methods

Generating JavaDoc for Java source code
Add Dependabot config and modernize CI/build tooling: update GitHub Actions to use checkout@v5 and setup-java@v5, switch build steps to use ./mvnw, and enhance maven-publish with input validation, a release job (tag/release creation and next-patch bump). Add mvnw and mvnw.cmd, upgrade maven wrapper to 3.3.4 and point distribution to an Aliyun mirror. Also apply widespread JavaDoc/comment improvements and minor pom adjustments across service registry and discovery modules, and remove redundant test logback resources.
Ensure the Maven wrapper is executable before invoking it in the GitHub Actions job to avoid permission errors on runners where the execute bit may not be preserved. Adds `chmod +x mvnw` prior to running `./mvnw --batch-mode --update-snapshots --file pom.xml`.
Add a dedicated step to chmod +x mvnw before the build and remove the redundant chmod from the 'Build with Maven' step. This ensures the Maven wrapper is executable on the runner and keeps the build step focused on running ./mvnw with the existing flags.
Delete the unit test file FeignClientSpecificationPostProcessorTest from microsphere-spring-cloud-openfeign. The removed test covered injection of AUTO_REFRESH_CAPABILITY_CLASS into FeignClientSpecification; the file has been removed from the test suite (deleted at src/test/java/io/microsphere/spring/cloud/openfeign/autoconfigure/FeignClientSpecificationPostProcessorTest.java).
Refactor: pull the trace logging into a static helper method log(Class<?>[], Class<?>[]) and invoke it from the post-processor. This makes the logging logic reusable and easier to test. Add FeignClientSpecificationPostProcessorTest that calls the new log method (with LoggingLevelsTest configured) to ensure the logging path is exercised. No functional behavior change.
Modernize CI with Dependabot, GitHub Actions, and Maven wrapper
Delete explicit maven.compiler.source and maven.compiler.target (set to 8) from microsphere-spring-cloud-openfeign/pom.xml to rely on parent/default compiler plugin settings and reduce duplication.
Remove Spring Boot/Cloud version properties from the top-level and place them into a renamed profile (java8-16 -> spring-cloud-2021). The profile is now activeByDefault (was activated by a JDK range) and contains spring-boot.version, spring-cloud.version and spring-cloud-alibaba.version. Also update junit-jupiter.version to 5.14.3 at the top level. This centralizes Spring BOM versions in a dedicated, enabled profile and upgrades the JUnit version.
Refactor Maven properties and centralize Spring BOM versions
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
...ient/discovery/ReactiveDiscoveryClientAdapter.java 100.00% <ø> (ø) 9.00 <0.00> (ø)
...g/cloud/client/discovery/UnionDiscoveryClient.java 100.00% <ø> (ø) 17.00 <0.00> (ø)
...utoconfigure/DiscoveryClientAutoConfiguration.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...gure/ReactiveDiscoveryClientAutoConfiguration.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...ient/service/registry/InMemoryServiceRegistry.java 100.00% <ø> (ø) 10.00 <0.00> (ø)
...vice/registry/MultipleAutoServiceRegistration.java 100.00% <ø> (ø) 5.00 <0.00> (ø)
.../client/service/registry/MultipleRegistration.java 100.00% <ø> (ø) 16.00 <0.00> (ø)
...ient/service/registry/MultipleServiceRegistry.java 100.00% <ø> (ø) 14.00 <0.00> (ø)
.../client/service/registry/RegistrationMetaData.java 96.15% <ø> (-3.85%) 23.00 <0.00> (-1.00)
...ervice/registry/SimpleAutoServiceRegistration.java 100.00% <ø> (ø) 5.00 <0.00> (ø)
... and 33 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mercyblitz mercyblitz merged commit ae7a8d7 into release-1.x Mar 27, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants