Pre-check
- [x] I am sure that all the content I provide is in English.
Search before asking
- [x] I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo 3.3.3
Steps to reproduce this issue
JAX-RS Rest Mapping
Java Code like this:
`@Path("/api-sys/dict_categories") @Consumes(MediaType.APPLICATION_JSON) public interface DictCategoryService {
@POST
@Path("")
DictCategoryDTO add(DictCategoryRequest request) throws WebAppRuntimeException;
@PUT
@Path("/{id}")
DictCategoryDTO modify(@PathParam("id") Long id, DictCategoryRequest request) throws WebAppRuntimeException;
@PUT
@Path("/{id}/active")
DictCategoryDTO modifyActive(@PathParam("id") Long id, DictCategoryActiveRequest request) throws WebAppRuntimeException;
@DELETE
@Path("/{id}")
void remove(@PathParam("id") Long id) throws WebAppRuntimeException;
@GET
@Path("/{id}")
DictCategoryDTO findById(@PathParam("id") Long id);
}`
[DUBBO] Duplicate mapping for '/api-sys/dict_categories/{id}': mapping=RequestMapping{name='DictCategoryAppService#remove', path=PathCondition{paths=[/api-sys/dict_categories/{id}]}, methods=MethodsCondition{methods=[DELETE]}, consumes=ConsumesCondition{mediaTypes=[application/json]}, custom=ServiceVersionCondition{group='yugong-iprojects-dict-local', version='null'}}, method=MethodMeta{method=com.yugong.libraries.dict.api.DictCategoryService.remove(Long), service=DictCategoryAppService@1f489987}, exists=Registration{mapping=RequestMapping{name='DictCategoryAppService#findById', path=PathCondition{paths=[/api-sys/dict_categories/{id}]}, methods=MethodsCondition{methods=[GET]}, consumes=ConsumesCondition{mediaTypes=[application/json]}, custom=ServiceVersionCondition{group='yugong-iprojects-dict-local', version='null'}}, method=MethodMeta{method=com.yugong.libraries.dict.api.DictCategoryService.findById(Long), service=DictCategoryAppService@1f489987}}, dubbo version: 3.3.3, current host: 192.168.0.105, error code: 99-0. This may be caused by , go to https://dubbo.apache.org/faq/99/0 to find instructions.
[DUBBO] Duplicate mapping for '/api-sys/dict_categories/{id}': mapping=RequestMapping{name='DictCategoryAppService#modify', path=PathCondition{paths=[/api-sys/dict_categories/{id}]}, methods=MethodsCondition{methods=[PUT]}, consumes=ConsumesCondition{mediaTypes=[application/json]}, custom=ServiceVersionCondition{group='yugong-iprojects-dict-local', version='null'}}, method=MethodMeta{method=com.yugong.libraries.dict.api.DictCategoryService.modify(Long, DictCategoryRequest), service=DictCategoryAppService@1f489987}, exists=Registration{mapping=RequestMapping{name='DictCategoryAppService#findById', path=PathCondition{paths=[/api-sys/dict_categories/{id}]}, methods=MethodsCondition{methods=[GET]}, consumes=ConsumesCondition{mediaTypes=[application/json]}, custom=ServiceVersionCondition{group='yugong-iprojects-dict-local', version='null'}}, method=MethodMeta{method=com.yugong.libraries.dict.api.DictCategoryService.findById(Long), service=DictCategoryAppService@1f489987}}, dubbo version: 3.3.3, current host: 192.168.0.105, error code: 99-0. This may be caused by , go to https://dubbo.apache.org/faq/99/0 to find instructions.
What you expected to happen
The path '/api-sys/dict_categories/{id}' with multiple HTTP methods will be correctly recognized. Like this: /api-sys/dict_categories/{id}: GET /api-sys/dict_categories/{id}: PUT /api-sys/dict_categories/{id}: DELETE
Anything else
The bug method is located in the code at "DefaultRequestMappingRegistry.register0".
Are you willing to submit a pull request to fix on your own?
- [ ] Yes I am willing to submit a pull request on my own!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Comment From: oxsean
Thanks for the feedback — this is a bug.
Comment From: Stellar1999
The bug has been fixed, and the issue will be closed.