{8.1.0-updated} BasicRestServlet
The {@link oajr.BasicRestServlet} class is a subclass of {@link oajr.RestServlet} preconfigured with the following:
The contents of the class is shown below. You should notice that very little code is being used and everything is configurable through annotations:
Additional annotations are pulled in from the {@link oajr.BasicRestConfig} interface which simply exists to define a common set of annotations. Notice that it has no code at all.
Your top-level resource will simply extend from this class, as shown in the Hello World example from a couple sections back.
It's important to notice that the
Not shown but equally important is that all of the annotations shown have programmatic equivalents via the {@link oajr.RestContextBuilder} class which can be manipulated during servlet initialization. (As a general rule, all annotations throughout Juneau have programmatic equivalents.)
There's a lot going on in this class. But not to worry, the details will be described later.