jungm commented on code in PR #2983:
URL: https://github.com/apache/cxf/pull/2983#discussion_r3034030966


##########
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java:
##########
@@ -246,22 +246,26 @@ public URI resolve(URI uri) {
     @Override
     public String getMatchedResourceTemplate() {
         if (stack != null) {
-            final List<URITemplate> templates = new LinkedList<>();
+            String matchedResourceTemplate = (String) 
message.getExchange().getEndpoint()

Review Comment:
   @reta it is being set in `ResourceUtils` to `address`, which is being 
constructed by:
   ```java
           String address = "/";
           if (!ignoreAppPath) {
               ApplicationPath appPath = locateApplicationPath(app.getClass());
               if (appPath != null) {
                   address = appPath.value();
               }
           }
           if (!address.startsWith("/")) {
               address = "/" + address;
           }
   ```
   
   So ideally, this is just the annotated `@ApplicationPath` (with 
normalization and respect for `jaxrs.application.address.ignore`) plus the 
paths of the resources being appended in `getMatchedResourceTemplate`
   
   Though I do admit this might be hacky, maybe theres a better way to do this 
I didn't find? I don't really know the CXF code, always happy for feedback :)



-- 
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