Sean-Walker0 opened a new pull request, #7516:
URL: https://github.com/apache/shenyu/pull/7516

   Fixes #7477
   
   ## Modifications
   
   The project pins Spring Boot 3.3.1, which loads auto-configuration 
candidates **only** from 
`META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports`
 and no longer reads `EnableAutoConfiguration` entries from 
`META-INF/spring.factories`. `shenyu-examples-common` registered 
`InterceptorConfiguration` only via `spring.factories`, so example applications 
depending on the shared module (e.g. `shenyu-examples-springmvc` using `@Log` 
on `HttpTestController`) silently lost the aspect support on Boot 3 — the 
configuration lives in the sibling package 
`org.apache.shenyu.examples.common.aop` and is not picked up by component 
scanning either.
   
   This adds the Boot 3 registration file listing the same configuration class 
(the legacy `spring.factories` entry is kept untouched for older tooling), plus 
a `spring-boot-starter-test` (test scope) dependency for the module's first 
test:
   
   ```
   
shenyu-examples-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
     -> org.apache.shenyu.examples.common.aop.InterceptorConfiguration
   ```
   
   ## Verifying this change
   
   - [x] New `Boot3AutoConfigurationMetadataTest` — asserts the Boot 3 imports 
file exists and registers exactly the configuration classes declared in the 
legacy `spring.factories`. Red before the imports file existed (`... is missing 
from the module resources`), green after.
   - [x] Module build with tests + checkstyle green: `cd 
shenyu-examples/shenyu-examples-common && ../mvnw test`.
   
   ## Notes
   
   - The test reads the module's own `src/main/resources` files by path rather 
than via the classloader, because the classloader would resolve the 
identically-named `AutoConfiguration.imports` inside 
`spring-boot-autoconfigure`'s jar first.
   - No behavior change for Boot 2-style tooling (spring.factories untouched); 
Boot 3 example applications now get the shared configuration as intended.
   - Orthogonality: no open PR touches `shenyu-examples-common` (verified 
against the file lists of all open PRs).
   
   Make sure that:
   
   - [x] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [x] You submit test cases (unit or integration tests) that back your 
changes.
   - [x] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true` (module-scoped: 
`shenyu-examples/shenyu-examples-common`, test + checkstyle green).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to