Add Spring milestone repository and update release notes generation#104
Merged
mercyblitz merged 23 commits intomicrosphere-projects:dev-1.xfrom Apr 28, 2026
Merged
Add Spring milestone repository and update release notes generation#104mercyblitz merged 23 commits intomicrosphere-projects:dev-1.xfrom
mercyblitz merged 23 commits intomicrosphere-projects:dev-1.xfrom
Conversation
Add a <repositories> section to microsphere-spring-boot-parent/pom.xml registering the Spring Portfolio milestone repository (id: spring-milestone, url: https://repo.spring.io/milestone). This enables resolving Spring milestone artifacts from the parent POM.
Update maven-publish workflow to generate release notes via a Copilot/Models API step. Adds limited permissions (contents: read for build and models: read for the publish job), a Python-based step that collects commits since the previous tag, calls the model to produce concise markdown release notes, appends them to release-notes.md and writes /tmp/current-release-notes.md for the release step. The Create Release step now uses --notes-file and the job also stages release-notes.md so it gets committed after publishing.
Avoid a direct compile-time dependency on Micrometer by replacing @ConditionalOnBean(MeterRegistry.class) with @ConditionalOnBean(type = METER_REGISTRY_CLASS_NAME). Added a string constant METER_REGISTRY_CLASS_NAME (with javadoc) and removed the MeterRegistry import so the conditional is resolved by class name at runtime.
Import MeterRegistry and add assertions in ActuatorAutoConfigurationTest to verify the METER_REGISTRY_CLASS_NAME constant equals the expected fully-qualified name ("io.micrometer.core.instrument.MeterRegistry") and matches MeterRegistry.class.getName(). This strengthens the test by ensuring the constant correctly references the MeterRegistry class name.
Update README: bump branch table versions for 0.2.x and 0.1.x to 0.2.11 and 0.1.11, respectively. Apply minor formatting fixes (adjust blank lines around badges and code blocks, and wrap the 'Before you log a bug' line) to improve readability.
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Delete the <repositories> section from microsphere-spring-boot-parent/pom.xml, removing the spring-milestone repository entry (id: spring-milestone, url: https://repo.spring.io/milestone). This cleans up the parent POM to avoid relying on the Spring milestone repository during builds.
Remove the `permissions: contents: read` block from the build job in the maven-publish workflow. This simplifies the workflow by relying on repository/default permissions instead of an explicit read permission; no other functional changes were made.
Add explicit GitHub Actions permissions block to the Maven workflow, granting read-only access to repository contents. This limits the workflow's token scope and ensures the job has the necessary read access for checkout and related steps.
Give the build job read access to repo contents and improve release notes generation. The AI prompt was expanded to include more structured sections (New Features, Bug Fixes, Documentations, Dependency Updates, Test Improvements, Build and Workflow Enhancements, Other Changes). A Full Changelog link is now generated and appended to the repository NOTES file and the temporary release notes file. Also normalize newlines and use the raw inputs.revision (no implicit "v" prefix) when checking/creating GitHub releases, plus small whitespace/end-of-file fixes.
Change .mvn/wrapper/maven-wrapper.properties to point to Apache's official distribution URL and upgrade the Maven binary from 3.9.9 to 3.9.14 (dlcdn.apache.org). This ensures the wrapper fetches the official Apache Maven 3.9.14 release instead of the previous mirror.
Update the parent POM version from 0.2.6 to 0.2.7 to pick up the latest changes from io.github.microsphere-projects:microsphere-build (build fixes/dependency updates).
Update the <microsphere-spring.version> property in the parent POM from 0.1.9 to 0.1.11 so child modules use the newer microsphere-spring release.
Bump Maven distribution from 3.9.14 to 3.9.15 and update the wrapper distributionUrl to use the Maven Aliyun mirror in .mvn/wrapper/maven-wrapper.properties. This ensures the project uses Maven 3.9.15 and can fetch the binary from an alternate mirror.
Update .mvn/wrapper/maven-wrapper.properties to point distributionUrl to repo1.maven.org (Maven Central) instead of the previous aliyun mirror. Ensures the Maven wrapper downloads the official Apache Maven distribution from Maven Central.
Reduce the GitHub Actions build matrix to Java 8 and 11 and add strategy.max-parallel: 7 to cap concurrent jobs. This lowers CI resource usage and shortens run time by removing additional Java versions and limiting parallelism.
Update microsphere-spring.version in microsphere-spring-boot-parent/pom.xml from 0.1.11 to 0.1.13 to pick up the latest microsphere-spring fixes and improvements.
Delete exclusion entries for org.apache.zookeeper:zookeeper and org.apache.curator (curator-recipes, curator-test) from the io.github.microsphere-projects:microsphere-spring-test test dependency in pom.xml. This allows the previously excluded Curator/Zookeeper test artifacts to be pulled in transitively and available on the test classpath.
Update <microsphere-spring.version> from 0.1.13 to 0.1.14 and remove the junit-bom import from dependencyManagement. Keeps Spring Boot dependency imports intact; no other functional changes.
Add an import for org.junit:junit-bom to the parent POM's dependencyManagement, using ${junit-jupiter.version} to centrally manage JUnit/Jupiter dependency versions across modules. This ensures consistent test dependency versions alongside the existing Spring Boot BOM imports.
Replace the CURRENT enum initialization to use Version.ofVersion(SpringBootVersion.class) instead of parsing the runtime version string. Adds a static import for ofVersion and switches from org.springframework.boot.SpringBootVersion.getVersion() to class-based resolution, making version detection more robust and consistent with Version utilities.
Include ActuatorAutoConfigurationTest.class in the classes arrays for the MeterRegistryPresent and MeterRegistryAbsent @SpringBootTest cases so the test class is loaded into the application context during those tests. This ensures the test's configuration/beans are available when running the actuator-related test scenarios.
Replace MockEnvironment.setProperty with withProperty in SpringApplicationUtilsTest.testGetLoggingLevel to set the logging level. This updates the test to use the current MockEnvironment API (avoids deprecated call and supports fluent usage).
Expand the GitHub Actions maven-build workflow matrix to include JDK 17, 21, and 25 in addition to existing 8 and 11. This updates CI to build and test the project against newer Java releases to ensure compatibility.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request introduces several improvements to the Maven publishing workflow and refines the actuator auto-configuration logic. The most significant changes are the automation of release notes generation using GitHub Copilot, improvements to conditional bean creation for better compatibility, and enhancements to the test suite for stronger type checks. Additionally, a new repository is added to the Maven parent POM to support milestone dependencies.
Workflow and Release Automation
.github/workflows/maven-publish.yml) now automatically generates release notes using GitHub Copilot by summarizing commits between tags and formatting them into markdown sections. The generated notes are appended torelease-notes.mdand used in the GitHub release step.buildjob now explicitly requestscontents: read, and thepublishjob requests bothcontents: writeandmodels: readfor Copilot API access. [1] [2]pom.xmlandrelease-notes.mdare staged and committed for version bumping.Spring Boot Actuator Auto-Configuration
@ConditionalOnBeancheck (METER_REGISTRY_CLASS_NAME) instead of a direct class reference, improving compatibility with optional dependencies. [1] [2]METER_REGISTRY_CLASS_NAMEconstant is introduced for this purpose, and relevant imports are adjusted. [1] [2]Testing Improvements
METER_REGISTRY_CLASS_NAMEconstant, including a strong type check againstMeterRegistry.class.getName(). [1] [2] [3]Maven Parent POM Updates
repositoriessection inmicrosphere-spring-boot-parent/pom.xmlto enable resolving milestone dependencies. [1] [2]