Quarkus support for multiple @ApplicationPaths?

932 views
Skip to first unread message

David Hoffer

unread,
Mar 2, 2021, 7:34:34 PM3/2/21
to Quarkus Development mailing list
I'm porting a new application to Quarkus and get this build error.

[error]: Build step io.quarkus.resteasy.server.common.deployment.ResteasyServerCommonProcessor#build threw an exception: java.lang.RuntimeException: Multiple classes (XXX) have been annotated with @ApplicationPath which is currently not supported

This is a small JAX-RS application that happens to have multiple path roots.  How do I support this in the Quarkus build?

Thanks,
-Dave

Stuart Douglas

unread,
Mar 2, 2021, 8:20:39 PM3/2/21
to David Hoffer, Quarkus Development mailing list
We don't support this at the moment, we have seen very little demand for it. Can you elaborate a bit on why you need it?

Stuart

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/f44a2cfd-eaa1-40ad-846a-dd9e15bf565fn%40googlegroups.com.

David Hoffer

unread,
Mar 2, 2021, 8:25:45 PM3/2/21
to Quarkus Development mailing list
In this app they separated the REST paths into 4 different families of endpoints...each with a different root path.

So can I do the same thing with inheritance and have a different root class/path for each of the 4 families?  I assume that @Path on inherited classes are concatenated, right?

-Dave

Sergey Beryozkin

unread,
Mar 3, 2021, 4:59:23 AM3/3/21
to dhof...@gmail.com, Quarkus Development mailing list
It should be doable with the root class resources (CR) alone, ex
  CR1:  /root1/a
  CR2:  /root1/b
  CR3:  /root2/a
  CR4:  /root4/a
In this case ApplicationPath only optimizes the CR root path expressions (you'd have /root1 and 2 classes CR1 and CR2 at /a and /b) so it should be equivalent

or, using subresources can produce something very compact as well

Thanks, Sergey

Reply all
Reply to author
Forward
0 new messages