You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the post processor only supports one value from the PostMapping annotation. In the scenario that there are multiple routes that is processed by the same method/controller, only the first value/path is taken into account. I think we can enhance the post processor such that all paths specified within PostMapping annotation are taken into consideration and not only the first path as it is now.
Expected Behavior
When annotating a controller with
@RequestMapping
and a method with@PostMapping
actual HTTP path is the combination of both.So, when annotating the method with
@Topic
I expect it to map the topic with the full path.Actual Behavior
The topic is mapped with a truncated path, which is only the
@PostMapping
value.Publishing to the topic constantly fail, as path not found.
Steps to Reproduce the Problem
Create a controller and start the app:
Publish with
dapr publish --publish-app-id myapp --pubsub pubsub --topic my-topic --data hello-world
.Observe sidecar error:
"non-retriable error returned from app while processing pub/sub event 9d8b9f70-9985-4665-8ce8-1d63a7935977: {\"timestamp\":1645712855614,\"status\":404,\"error\":\"Not Found\",\"message\":\"No message available\",\"path\":\"/foo\"}. status code returned: 404"
.Error referrs to
"path": "/foo"
, but actual path is/v1/foo
.The code that can be improved is on https://github.com/dapr/java-sdk/blob/master/sdk-springboot/src/main/java/io/dapr/springboot/DaprBeanPostProcessor.java
Release Note
RELEASE NOTE: FIX Topic annotation handles class-level @RequestMapping
The text was updated successfully, but these errors were encountered: