[ https://issues.apache.org/jira/browse/TOMEE-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14386420#comment-14386420
]
Romain Manni-Bucau commented on TOMEE-1535:
-------------------------------------------
Yes, added openejb.jaxrs.scanning.methods (to set to true) to activate back the previous behavior.
@Sebastian: previous behavior was to consider "subresource" as real resources which was often
enough the case to be an issue for users. I guess it was when JAXRS was new (since then you
can have other issues for real apps) so it is ok IMO to switch back to the normal behavior.
> JAX-RS Subresource paths are chosen incorrectly
> -----------------------------------------------
>
> Key: TOMEE-1535
> URL: https://issues.apache.org/jira/browse/TOMEE-1535
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Sebastian Daschner
> Fix For: 2.0.0-Milestone-1, 1.7.2
>
>
> When using a JAX-RS root resource with a subresource, the path of the subresources are
evaluated in a wrong way.
> Consider following code:
> @Stateless
> @Path("/")
> public class RootResource {
> @Context
> ResourceContext resourceContext;
> @GET
> public String getRoot() {
> return "root";
> }
> @Path("models")
> public ModelsResource models() {
> return resourceContext.getResource(ModelsResource.class);
> }
> }
> and:
> public class ModelsResource {
> @GET
> public String getAll() {
> return "all";
> }
> @GET
> @Path("{id}")
> public String get(@PathParam("id") final String id) {
> return "model_" + id;
> }
> }
> The paths of the resources which TomEE evaluates are:
> /resources/ -> String getRoot()
> /resources/ -> String getAll()
> /resources/{id} -> String get(String)
> But the correct way due to the spec would be
> /resources/models/ -> getAll() and
> /resources/models/{id} -> get(String).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
|