I have a project that uses Spring that I wish to introduce AOP to.
Our resource classes have constructors with arguments so I believe
this requires introducing interfaces and annotating those instead of
the implementation so that Spring can do its "magic", and this is
where the problems start.
I've moved my annotations to my interface, so I end with something like:
@Path("/")
public interface BlahResource {
@Path("/blah/{id}")
public void getTheBlah();
}
public class JaxRsBlahResource implements BlahResource {
public void getTheBlah() { .... }
}
This throwns an error as following:
SEVERE: Conflicting URI templates. The URI template / for root
resource class JaxRsBlahResource and the URI template / transform to
the same regular expression (/.*)?
So it seems that the @Path component is being picked up twice. If I
add another @Path annotation to the implementation, so something like:
@Path("/blah")
The everything works ok, but I now have that resource exposed at two
different endpoints.
It feels like I'm missing something obvious, but I'm tearing my hair
out figuring out what?
--
Maybe she awoke to see the roommate's boyfriend swinging from the
chandelier wearing a boar's head.
Something which you, I, and everyone else would call "Tuesday", of course.