juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Bognar <jamesbog...@apache.org>
Subject @RestResource/@RestMethod annotations.
Date Fri, 17 Mar 2017 02:24:40 GMT
Hi all,

Quick update...

I've made code changes to the REST APIs that now allow you to use the
@RestResource/@RestMethod annotations on any class, not just subclasses of
the RestServlet class.  The only restriction is that the top-level resource
must subclass class from RestServlet.  Child classes can be anything.

I've added various new classes and features to the API that should allow
you to do the same on a non-RestServlet resource as you could on one that
subclasses from RestServlet.

In fact, non-RestServlet resources have the added ability of defining a
constructor that gets passed the servlet configuration so that you can make
the fields in your class final:
public T(RestConfig);

The RestConfig class is new and allows you to programmatically
add/overwrite anything defined via annotations before it gets set-in-stone
in a read-only RestContext object.

The code has just been delivered.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message