Aias00 opened a new issue, #7737: URL: https://github.com/apache/shenyu/issues/7737
### Current limitation Both native Spring MVC and ShenYu annotation arrays are collapsed to their first element during extraction and registration: - [RequestMappingProcessor.getPath():78–83](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/proceeor/extractor/RequestMappingProcessor.java#L78) selects `RequestMapping.path()[0]`. - [ShenyuSpringMvcClientProcessorImpl:36–61](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/proceeor/register/ShenyuSpringMvcClientProcessorImpl.java#L36) selects only the first class/method ShenYu path. - [SpringMvcApiMetaRegister.parse():123–166](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-client/shenyu-client-http/shenyu-client-springmvc/src/main/java/org/apache/shenyu/client/springmvc/register/SpringMvcApiMetaRegister.java#L123) produces one effective path per namespace. - The legacy event listener explicitly comments that only the first path is temporarily supported (SpringMvcClientEventListener.java:301–303). This is therefore presented as an enhancement to a documented implementation limitation. ### Evidence / impact A Java probe compiled the current processors, annotation and registrar. A class with two paths `/v1`, `/legacy` and method paths `/foo`, `/bar` has four effective combinations. With registration context `/app`, both the native and ShenYu annotation paths produced: ```text Native DECLARED_COMBINATIONS=4 REGISTERED=[/app/v1/foo] Custom DECLARED_COMBINATIONS=4 REGISTERED=[/app/v1/foo] ``` An independent reviewer confirmed the truncation sites and the first-path-only fallback. Exact selector/rule registration can leave aliases inaccessible through the gateway even when the application handles them; a broad wildcard selector can mask the limitation. No universal alias-404 claim or full deployed gateway run is made. ### Proposed enhancement / acceptance criteria Preserve all class/method paths through extraction and register every effective combination per namespace. Apply context-path joining consistently, deduplicate overlapping aliases, respect explicit ShenYu overrides and preserve wildcard registration semantics. Include native/composed Spring mappings and ShenYu annotation value/path aliases in the supported contract. ### Related existing work No matching multi-path/RequestMapping-array issue found in the historical baseline, open PRs or targeted searches. #6664 concerns namespace propagation, while #7465 concerns aliases in the separate caller SDK. Native and ShenYu registration are grouped here because they lose the same path-list information in one registration pipeline. ### Reviewed revision Apache ShenYu 2.7.2-SNAPSHOT, `master@66d7d954ca37d651a5ad916f988a8081157a7ab4`. Priority P2 / Medium. Unit-test and CI issue categories excluded. -- 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]
