From 5a8b4b815e6a44d10fbd63f2f01514e028a6b5e0 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Fri, 10 Apr 2026 16:58:13 +0800 Subject: [PATCH 01/23] Add Spring milestone repository to parent POM Add a 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. --- microsphere-spring-boot-parent/pom.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/microsphere-spring-boot-parent/pom.xml b/microsphere-spring-boot-parent/pom.xml index 810cf22e..7e86da2c 100644 --- a/microsphere-spring-boot-parent/pom.xml +++ b/microsphere-spring-boot-parent/pom.xml @@ -53,11 +53,19 @@ pom import + - + + + spring-milestone + Spring Portfolio Milestone Repository + https://repo.spring.io/milestone + + + spring-boot-2.1 @@ -109,6 +117,5 @@ 2.7.18 - \ No newline at end of file From df4425674afe3595daa9cf3ece77f0814f05a817 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Fri, 10 Apr 2026 16:58:24 +0800 Subject: [PATCH 02/23] Add Copilot-generated release notes 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. --- .github/workflows/maven-publish.yml | 85 ++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 7f5c04c6..556a74fe 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -21,6 +21,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read if: ${{ inputs.revision }} steps: - name: Validate version format @@ -66,6 +68,7 @@ jobs: needs: build permissions: contents: write + models: read steps: - name: Checkout Source uses: actions/checkout@v5 @@ -83,14 +86,90 @@ jobs: git push origin ${{ inputs.revision }} fi + - name: Generate Release Notes with Copilot + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + CURRENT_TAG="${{ inputs.revision }}" + + # Find the previous tag (the one before the current tag) + PREV_TAG=$(git describe --tags --abbrev=0 --exclude="${CURRENT_TAG}" HEAD 2>/dev/null || echo "") + + # Collect commits between the previous tag and HEAD + if [ -n "$PREV_TAG" ]; then + COMMITS=$(git log --oneline "${PREV_TAG}..HEAD" 2>/dev/null || echo "No commits found") + SINCE_LABEL="$PREV_TAG" + else + COMMITS=$(git log --oneline -50 2>/dev/null || echo "No commits found") + SINCE_LABEL="the beginning" + fi + + # Export for Python (avoids shell-escaping issues with multiline content) + export CURRENT_TAG_DATA="$CURRENT_TAG" + export PREV_TAG_DATA="$SINCE_LABEL" + export COMMITS_DATA="$COMMITS" + + # Call GitHub Copilot via GitHub Models API and capture the summary + SUMMARY=$(python3 << 'PYEOF' + import json, os, urllib.request, sys + + current_tag = os.environ['CURRENT_TAG_DATA'] + prev_tag = os.environ['PREV_TAG_DATA'] + commits = os.environ['COMMITS_DATA'] + token = os.environ['GH_TOKEN'] + + prompt = ( + f"Generate concise release notes for version {current_tag}.\n\n" + f"Commits since {prev_tag}:\n{commits}\n\n" + "Format the output as markdown with sections for New Features, Bug Fixes, " + "and Other Changes (only include sections that have relevant commits). " + "Be concise and clear." + ) + + payload = json.dumps({ + "model": "gpt-4o", + "messages": [{"role": "user", "content": prompt}] + }).encode() + + req = urllib.request.Request( + "https://models.inference.ai.azure.com/chat/completions", + data=payload, + headers={ + "Content-Type": "application/json", + "Authorization": f"Bearer {token}" + } + ) + + try: + with urllib.request.urlopen(req) as resp: + data = json.loads(resp.read()) + print(data["choices"][0]["message"]["content"]) + except Exception as e: + print(f"Failed to generate summary via Copilot: {e}", file=sys.stderr) + print(f"_Release notes generation failed. Raw commits since {prev_tag}:_\n\n```\n{commits}\n```") + PYEOF + ) + + # Append the summary (with version header) to release-notes.md + NOTES_FILE="release-notes.md" + if [ ! -f "$NOTES_FILE" ]; then + printf "# Release Notes\n\n" > "$NOTES_FILE" + fi + printf "## v%s\n\n%s\n\n" "$CURRENT_TAG" "$SUMMARY" >> "$NOTES_FILE" + + # Write the current release notes to a temp file for the Create Release step + printf "%s" "$SUMMARY" > /tmp/current-release-notes.md + + echo "Release notes generated and appended to $NOTES_FILE" + - name: Create Release run: | if gh release view "v${{ inputs.revision }}" >/dev/null 2>&1; then echo "Release v${{ inputs.revision }} already exists, skipping." else - gh release create v${{ inputs.revision }} \ + gh release create ${{ inputs.revision }} \ --title "v${{ inputs.revision }}" \ - --generate-notes \ + --notes-file /tmp/current-release-notes.md \ --latest fi env: @@ -111,7 +190,7 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add pom.xml + git add pom.xml release-notes.md git diff --cached --quiet && echo "No changes to commit" || \ git commit -m "chore: bump version to next patch after publishing ${{ inputs.revision }}" && git push From d6582949e865875169f89d5cf71c42298e1d9f36 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Fri, 10 Apr 2026 16:59:27 +0800 Subject: [PATCH 03/23] Use type-based ConditionalOnBean for MeterRegistry 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. --- .../actuate/autoconfigure/ActuatorAutoConfiguration.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/microsphere-spring-boot-actuator/src/main/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfiguration.java b/microsphere-spring-boot-actuator/src/main/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfiguration.java index 4ac5be12..e7f841dd 100644 --- a/microsphere-spring-boot-actuator/src/main/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfiguration.java +++ b/microsphere-spring-boot-actuator/src/main/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfiguration.java @@ -16,7 +16,6 @@ */ package io.microsphere.spring.boot.actuate.autoconfigure; -import io.micrometer.core.instrument.MeterRegistry; import io.microsphere.annotation.ConfigurationProperty; import io.microsphere.spring.boot.actuate.MonitoredThreadPoolTaskScheduler; import org.springframework.beans.factory.annotation.Value; @@ -87,6 +86,12 @@ public class ActuatorAutoConfiguration { */ public static final String ACTUATOR_TASK_SCHEDULER_SERVICE_BEAN_NAME = "actuatorTaskScheduler"; + /** + * The class name of {@link io.micrometer.core.instrument.MeterRegistry} + * @see io.micrometer.core.instrument.MeterRegistry + */ + static final String METER_REGISTRY_CLASS_NAME = "io.micrometer.core.instrument.MeterRegistry"; + /** * Creates a {@link MonitoredThreadPoolTaskScheduler} bean for actuator tasks, configured * with the given pool size and thread name prefix. @@ -103,7 +108,7 @@ public class ActuatorAutoConfiguration { * @param threadNamePrefix the prefix for thread names created by the scheduler * @return a configured {@link ThreadPoolTaskScheduler} instance */ - @ConditionalOnBean(MeterRegistry.class) + @ConditionalOnBean(type = METER_REGISTRY_CLASS_NAME) @Bean(name = ACTUATOR_TASK_SCHEDULER_SERVICE_BEAN_NAME, destroyMethod = "shutdown") public ThreadPoolTaskScheduler actuatorTaskScheduler( @Value(TASK_SCHEDULER_POOL_SIZE_VALUE_EXPRESSION) int poolSize, From bde88387e87b49f3c7aefc523c923635cf657ca2 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Fri, 10 Apr 2026 16:59:53 +0800 Subject: [PATCH 04/23] Add tests for METER_REGISTRY_CLASS_NAME constant 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. --- .../actuate/autoconfigure/ActuatorAutoConfigurationTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/microsphere-spring-boot-actuator/src/test/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfigurationTest.java b/microsphere-spring-boot-actuator/src/test/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfigurationTest.java index f26d9830..73039649 100644 --- a/microsphere-spring-boot-actuator/src/test/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfigurationTest.java +++ b/microsphere-spring-boot-actuator/src/test/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfigurationTest.java @@ -16,6 +16,7 @@ */ package io.microsphere.spring.boot.actuate.autoconfigure; +import io.micrometer.core.instrument.MeterRegistry; import org.junit.jupiter.api.ClassOrderer.OrderAnnotation; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; @@ -31,6 +32,7 @@ import static io.microsphere.spring.boot.actuate.autoconfigure.ActuatorAutoConfiguration.ACTUATOR_TASK_SCHEDULER_SERVICE_BEAN_NAME; import static io.microsphere.spring.boot.actuate.autoconfigure.ActuatorAutoConfiguration.DEFAULT_TASK_SCHEDULER_POOL_SIZE; +import static io.microsphere.spring.boot.actuate.autoconfigure.ActuatorAutoConfiguration.METER_REGISTRY_CLASS_NAME; import static io.microsphere.spring.boot.actuate.autoconfigure.ActuatorAutoConfiguration.TASK_SCHEDULER_POOL_SIZE_PROPERTY_NAME; import static io.microsphere.spring.boot.actuate.autoconfigure.ActuatorAutoConfiguration.TASK_SCHEDULER_THREAD_NAME_PREFIX_PROPERTY_NAME; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -53,6 +55,9 @@ void testConstants() { assertEquals("1", DEFAULT_TASK_SCHEDULER_POOL_SIZE); assertEquals("microsphere.spring.boot.actuator.task-scheduler.pool-size", TASK_SCHEDULER_POOL_SIZE_PROPERTY_NAME); assertEquals("microsphere.spring.boot.actuator.task-scheduler.thread-name-prefix", TASK_SCHEDULER_THREAD_NAME_PREFIX_PROPERTY_NAME); + assertEquals("io.micrometer.core.instrument.MeterRegistry", METER_REGISTRY_CLASS_NAME); + // test for strong type check + assertEquals(MeterRegistry.class.getName(), METER_REGISTRY_CLASS_NAME); } @Order(1) From 71dcac9b160fc57188e2a668d99cfc3a6c069de4 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Fri, 10 Apr 2026 17:04:29 +0800 Subject: [PATCH 05/23] Bump README branch versions and format 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. --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 20ae97c3..8222c6aa 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ ![Maven](https://img.shields.io/maven-central/v/io.github.microsphere-projects/microsphere-spring-boot.svg) ![License](https://img.shields.io/github/license/microsphere-projects/microsphere-spring-boot.svg) - Microsphere Spring Boot is a collection of libraries that extends Spring Boot's capabilities with additional features focused on configuration management, application diagnostics, and enhanced monitoring. The project is structured as a multi-module Maven project that follows Spring Boot's conventions while providing value-added functionality. @@ -41,6 +40,7 @@ The easiest way to get started is by adding the Microsphere Spring Boot BOM (Bil pom.xml: ```xml + ... @@ -61,12 +61,13 @@ pom.xml: | **Branches** | **Purpose** | **Latest Version** | |--------------|--------------------------------------------------|--------------------| -| **0.2.x** | Compatible with Spring Boot 3.0.x - 3.5.x, 4.0.x | 0.2.10 | -| **0.1.x** | Compatible with Spring Boot 2.0.x - 2.7.x | 0.1.10 | +| **0.2.x** | Compatible with Spring Boot 3.0.x - 3.5.x, 4.0.x | 0.2.11 | +| **0.1.x** | Compatible with Spring Boot 2.0.x - 2.7.x | 0.1.11 | Then add the specific modules you need: ```xml + @@ -131,7 +132,8 @@ We welcome your contributions! Please read [Code of Conduct](./CODE_OF_CONDUCT.m ## Reporting Issues -* Before you log a bug, please search the [issues](https://github.com/microsphere-projects/microsphere-spring-boot/issues) +* Before you log a bug, please search + the [issues](https://github.com/microsphere-projects/microsphere-spring-boot/issues) to see if someone has already reported the problem. * If the issue doesn't already exist, [create a new issue](https://github.com/microsphere-projects/microsphere-spring-boot/issues/new). From 1b390b53df6f697e535d3dd1f6517fec8a32ab23 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Fri, 10 Apr 2026 19:48:14 +0800 Subject: [PATCH 06/23] Remove Spring milestone repository from parent POM Delete the 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. --- microsphere-spring-boot-parent/pom.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/microsphere-spring-boot-parent/pom.xml b/microsphere-spring-boot-parent/pom.xml index 7e86da2c..6665beff 100644 --- a/microsphere-spring-boot-parent/pom.xml +++ b/microsphere-spring-boot-parent/pom.xml @@ -53,18 +53,9 @@ pom import - - - - spring-milestone - Spring Portfolio Milestone Repository - https://repo.spring.io/milestone - - - spring-boot-2.1 From c9b3be8b9afee3d2f78501fcfa8f6fd13d191e78 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Fri, 10 Apr 2026 20:48:06 +0800 Subject: [PATCH 07/23] Remove explicit contents permission from build job 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. --- .github/workflows/maven-publish.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 556a74fe..45caa3c4 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -21,8 +21,6 @@ on: jobs: build: runs-on: ubuntu-latest - permissions: - contents: read if: ${{ inputs.revision }} steps: - name: Validate version format From 34fdb3eb33ae7b9ffef18f1613e58eee47f5b236 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 14 Apr 2026 12:02:24 +0800 Subject: [PATCH 08/23] Set workflow permissions for Maven build 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. --- .github/workflows/maven-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 86872ee4..afd8784f 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -8,6 +8,9 @@ name: Maven Build +permissions: + contents: read + on: push: branches: [ 'dev-1.x' ] From 62bd45a41e1b0d33c50fe7365a78f0fba4ca32ef Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 14 Apr 2026 12:57:09 +0800 Subject: [PATCH 09/23] Enhance release workflow notes and permissions 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. --- .github/workflows/maven-publish.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 45caa3c4..5ee1f198 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -21,6 +21,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read if: ${{ inputs.revision }} steps: - name: Validate version format @@ -60,7 +62,6 @@ jobs: SIGN_KEY: ${{ secrets.OSS_SIGNING_KEY }} SIGN_KEY_PASS: ${{ secrets.OSS_SIGNING_PASSWORD }} - release: runs-on: ubuntu-latest needs: build @@ -119,8 +120,9 @@ jobs: prompt = ( f"Generate concise release notes for version {current_tag}.\n\n" f"Commits since {prev_tag}:\n{commits}\n\n" - "Format the output as markdown with sections for New Features, Bug Fixes, " - "and Other Changes (only include sections that have relevant commits). " + "Format the output as markdown with sections if present for New Features, Bug Fixes, " + "Documentations, Dependency Updates, Test Improvements, Build and Workflow Enhancements " + "and Other Changes(excludes Full Changelog).\n\n" "Be concise and clear." ) @@ -153,20 +155,25 @@ jobs: if [ ! -f "$NOTES_FILE" ]; then printf "# Release Notes\n\n" > "$NOTES_FILE" fi + + FULL_CHANGELOG="**Full Changelog**: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/$PREV_TAG...$CURRENT_TAG" + printf "## v%s\n\n%s\n\n" "$CURRENT_TAG" "$SUMMARY" >> "$NOTES_FILE" - + printf "%s" "$FULL_CHANGELOG" >> "$NOTES_FILE" + # Write the current release notes to a temp file for the Create Release step - printf "%s" "$SUMMARY" > /tmp/current-release-notes.md + printf "%s\n\n" "$SUMMARY" > /tmp/current-release-notes.md + printf "%s" "$FULL_CHANGELOG" >> /tmp/current-release-notes.md echo "Release notes generated and appended to $NOTES_FILE" - name: Create Release run: | - if gh release view "v${{ inputs.revision }}" >/dev/null 2>&1; then - echo "Release v${{ inputs.revision }} already exists, skipping." + if gh release view "${{ inputs.revision }}" >/dev/null 2>&1; then + echo "Release ${{ inputs.revision }} already exists, skipping." else gh release create ${{ inputs.revision }} \ - --title "v${{ inputs.revision }}" \ + --title "${{ inputs.revision }}" \ --notes-file /tmp/current-release-notes.md \ --latest fi @@ -204,4 +211,4 @@ jobs: echo "::error::Merge conflict detected when merging release-1.x into dev-1.x. Manual intervention required." exit 1 fi - git push origin dev-1.x \ No newline at end of file + git push origin dev-1.x From b89c4288afd4bc305370e64560e083e6b5adaf60 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 14 Apr 2026 12:57:18 +0800 Subject: [PATCH 10/23] Update Maven distribution to 3.9.14 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. --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 423c23e5..ba3515c9 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,3 +1,3 @@ wrapperVersion=3.3.4 distributionType=only-script -distributionUrl=https://maven.aliyun.com/repository/public/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip +distributionUrl=https://dlcdn.apache.org/maven/maven-3/3.9.14/binaries/apache-maven-3.9.14-bin.zip From 02fbe38ced7facfe64fe26cfb2492ab8e5a75461 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 14 Apr 2026 12:57:41 +0800 Subject: [PATCH 11/23] Bump parent version to 0.2.7 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). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 414e1b2d..6096a99e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.github.microsphere-projects microsphere-build - 0.2.6 + 0.2.7 4.0.0 From d543a58f0f23f794164512d2d2954fe9b3df1b20 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 14 Apr 2026 12:58:13 +0800 Subject: [PATCH 12/23] Bump microsphere-spring version to 0.1.11 Update the property in the parent POM from 0.1.9 to 0.1.11 so child modules use the newer microsphere-spring release. --- microsphere-spring-boot-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsphere-spring-boot-parent/pom.xml b/microsphere-spring-boot-parent/pom.xml index 6665beff..047d9b79 100644 --- a/microsphere-spring-boot-parent/pom.xml +++ b/microsphere-spring-boot-parent/pom.xml @@ -19,7 +19,7 @@ Microsphere Spring Boot Parent - 0.1.9 + 0.1.11 1.7.2 5.14.3 From 93220d19ad63ce581cc7aa33113d2fed9686870f Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Mon, 27 Apr 2026 09:17:03 +0800 Subject: [PATCH 13/23] Update Maven wrapper to 3.9.15 (Aliyun mirror) 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. --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index ba3515c9..d76955bd 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,3 +1,3 @@ wrapperVersion=3.3.4 distributionType=only-script -distributionUrl=https://dlcdn.apache.org/maven/maven-3/3.9.14/binaries/apache-maven-3.9.14-bin.zip +distributionUrl=https://maven.aliyun.com/repository/public/org/apache/maven/apache-maven/3.9.15/apache-maven-3.9.15-bin.zip From 545c8aa8af05ec44c983544f7897d1606f1a8e64 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Mon, 27 Apr 2026 09:21:14 +0800 Subject: [PATCH 14/23] Switch Maven wrapper to Maven Central 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. --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index d76955bd..f8a57317 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,3 +1,3 @@ wrapperVersion=3.3.4 distributionType=only-script -distributionUrl=https://maven.aliyun.com/repository/public/org/apache/maven/apache-maven/3.9.15/apache-maven-3.9.15-bin.zip +distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.15/apache-maven-3.9.15-bin.zip From 47708537da69d8a615235c885513a7834ee1dc8d Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Mon, 27 Apr 2026 23:43:07 +0800 Subject: [PATCH 15/23] Limit Java matrix and set max-parallel 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. --- .github/workflows/maven-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index afd8784f..56fbe39c 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -21,8 +21,9 @@ jobs: build: runs-on: ubuntu-latest strategy: + max-parallel: 7 matrix: - java: [ '8', '11' , '17' , '21' , '25' ] + java: [ '8', '11' ] maven-profile-spring-boot: [ 'spring-boot-2.1' , 'spring-boot-2.2' , 'spring-boot-2.3', 'spring-boot-2.4' ,'spring-boot-2.5' , 'spring-boot-2.6' , 'spring-boot-2.7' ] From 4a3542e9c8ce93a8d00657e1e82c9f04fb81203c Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Mon, 27 Apr 2026 23:44:33 +0800 Subject: [PATCH 16/23] Bump microsphere-spring to 0.1.13 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. --- microsphere-spring-boot-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsphere-spring-boot-parent/pom.xml b/microsphere-spring-boot-parent/pom.xml index 047d9b79..919a2887 100644 --- a/microsphere-spring-boot-parent/pom.xml +++ b/microsphere-spring-boot-parent/pom.xml @@ -19,7 +19,7 @@ Microsphere Spring Boot Parent - 0.1.11 + 0.1.13 1.7.2 5.14.3 From 33c07fd681fd099798096e9d1c00181c4c1a2096 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 28 Apr 2026 13:09:43 +0800 Subject: [PATCH 17/23] Remove exclusions from microsphere-spring-test 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. --- microsphere-spring-boot-core/pom.xml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/microsphere-spring-boot-core/pom.xml b/microsphere-spring-boot-core/pom.xml index d686f513..9d0437be 100644 --- a/microsphere-spring-boot-core/pom.xml +++ b/microsphere-spring-boot-core/pom.xml @@ -65,20 +65,6 @@ io.github.microsphere-projects microsphere-spring-test test - - - org.apache.zookeeper - zookeeper - - - org.apache.curator - curator-recipes - - - org.apache.curator - curator-test - - From ec0c13dc926529b331c62c9e04e4d40e3190ad8a Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 28 Apr 2026 13:10:11 +0800 Subject: [PATCH 18/23] Bump microsphere-spring to 0.1.14; drop JUnit BOM Update 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. --- microsphere-spring-boot-parent/pom.xml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/microsphere-spring-boot-parent/pom.xml b/microsphere-spring-boot-parent/pom.xml index 919a2887..fe75844c 100644 --- a/microsphere-spring-boot-parent/pom.xml +++ b/microsphere-spring-boot-parent/pom.xml @@ -19,7 +19,7 @@ Microsphere Spring Boot Parent - 0.1.13 + 0.1.14 1.7.2 5.14.3 @@ -27,14 +27,6 @@ - - - org.junit - junit-bom - ${junit-jupiter.version} - pom - import - @@ -53,6 +45,7 @@ pom import + From 6b50a6a58e21a72a56d2d3bbd5dad74033f5df6c Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 28 Apr 2026 13:14:14 +0800 Subject: [PATCH 19/23] Import JUnit BOM in dependencyManagement 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. --- microsphere-spring-boot-parent/pom.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/microsphere-spring-boot-parent/pom.xml b/microsphere-spring-boot-parent/pom.xml index fe75844c..caedf5f7 100644 --- a/microsphere-spring-boot-parent/pom.xml +++ b/microsphere-spring-boot-parent/pom.xml @@ -27,6 +27,14 @@ + + + org.junit + junit-bom + ${junit-jupiter.version} + pom + import + @@ -45,7 +53,6 @@ pom import - From 8b7b439e6af87acd261a4e6b81fe59165e309107 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 28 Apr 2026 13:30:56 +0800 Subject: [PATCH 20/23] Use Version.ofVersion for CURRENT 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. --- .../java/io/microsphere/spring/boot/SpringBootVersion.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/microsphere-spring-boot-core/src/main/java/io/microsphere/spring/boot/SpringBootVersion.java b/microsphere-spring-boot-core/src/main/java/io/microsphere/spring/boot/SpringBootVersion.java index 25e90349..14c394b1 100644 --- a/microsphere-spring-boot-core/src/main/java/io/microsphere/spring/boot/SpringBootVersion.java +++ b/microsphere-spring-boot-core/src/main/java/io/microsphere/spring/boot/SpringBootVersion.java @@ -25,6 +25,7 @@ import static io.microsphere.constants.SymbolConstants.DOT_CHAR; import static io.microsphere.constants.SymbolConstants.UNDER_SCORE_CHAR; import static io.microsphere.util.Version.of; +import static io.microsphere.util.Version.ofVersion; /** * The enumeration for the released Spring Boot versions since 2.0 @@ -292,7 +293,7 @@ public enum SpringBootVersion { SPRING_BOOT_2_7_18, - CURRENT(of(org.springframework.boot.SpringBootVersion.getVersion())); + CURRENT(ofVersion(org.springframework.boot.SpringBootVersion.class)); private final Version version; From bb1f3bab3626f08456060c1604b6fb3fe30cbf4e Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 28 Apr 2026 13:52:22 +0800 Subject: [PATCH 21/23] Register test class in @SpringBootTest classes 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. --- .../autoconfigure/ActuatorAutoConfigurationTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/microsphere-spring-boot-actuator/src/test/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfigurationTest.java b/microsphere-spring-boot-actuator/src/test/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfigurationTest.java index 73039649..14be10be 100644 --- a/microsphere-spring-boot-actuator/src/test/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfigurationTest.java +++ b/microsphere-spring-boot-actuator/src/test/java/io/microsphere/spring/boot/actuate/autoconfigure/ActuatorAutoConfigurationTest.java @@ -66,7 +66,8 @@ void testConstants() { @SpringBootTest( webEnvironment = NONE, classes = { - MeterRegistryPresent.class + MeterRegistryPresent.class, + ActuatorAutoConfigurationTest.class }, properties = { "microsphere.spring.boot.actuator.task-scheduler.pool-size=2", "microsphere.spring.boot.actuator.task-scheduler.thread-name-prefix=my-prefix", @@ -109,7 +110,8 @@ void testActuatorTaskScheduler() { @SpringBootTest( webEnvironment = NONE, classes = { - MeterRegistryAbsent.class + MeterRegistryAbsent.class, + ActuatorAutoConfigurationTest.class }, properties = { // Spring Boot [2.x,3.x] "microsphere.autoconfigure.exclude[0]=org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration", From 0663ff57dd7d4513bc75c19e23b674ae72a55811 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 28 Apr 2026 13:52:36 +0800 Subject: [PATCH 22/23] Use MockEnvironment.withProperty in test 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). --- .../spring/boot/util/SpringApplicationUtilsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsphere-spring-boot-core/src/test/java/io/microsphere/spring/boot/util/SpringApplicationUtilsTest.java b/microsphere-spring-boot-core/src/test/java/io/microsphere/spring/boot/util/SpringApplicationUtilsTest.java index a35badd0..3ec52905 100644 --- a/microsphere-spring-boot-core/src/test/java/io/microsphere/spring/boot/util/SpringApplicationUtilsTest.java +++ b/microsphere-spring-boot-core/src/test/java/io/microsphere/spring/boot/util/SpringApplicationUtilsTest.java @@ -112,7 +112,7 @@ void testLog() { void testGetLoggingLevel(String level) { MockEnvironment environment = new MockEnvironment(); - environment.setProperty(MICROSPHERE_SPRING_BOOT_LOGGING_LEVEL_PROPERTY_NAME, level); + environment.withProperty(MICROSPHERE_SPRING_BOOT_LOGGING_LEVEL_PROPERTY_NAME, level); assertEquals(level, getLoggingLevel(environment)); } From 7daa8324aaf70ad70e5dce74234f4b595761ed82 Mon Sep 17 00:00:00 2001 From: Mercy Ma Date: Tue, 28 Apr 2026 13:57:18 +0800 Subject: [PATCH 23/23] Add Java 17, 21, 25 to CI matrix 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. --- .github/workflows/maven-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 56fbe39c..0d4ce187 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -23,7 +23,7 @@ jobs: strategy: max-parallel: 7 matrix: - java: [ '8', '11' ] + java: [ '8', '11' , '17' , '21' , '25' ] maven-profile-spring-boot: [ 'spring-boot-2.1' , 'spring-boot-2.2' , 'spring-boot-2.3', 'spring-boot-2.4' ,'spring-boot-2.5' , 'spring-boot-2.6' , 'spring-boot-2.7' ]