v9.0 Migration Guide
The following guide can be used to help migrate your code to v9.0. Note that you can also refer to the Release Notes for changes as well.
Old | New |
---|---|
@RestMethod annotation. | Has been replaced with RestOp, RestGet, RestPut, RestPost, RestDelete, RestOptions |
@RemoteMethod annotation. | Has been replaced with RemoteOp, RemoteGet, RemotePut, RemotePost, RemoteDelete. |
BasicRestServletJena , BasicRestServletJenaGroup classes. | These have been removed in 9.0 due to the removal of the Jena packages (due to security issues). Replace with BasicRestServlet and BasicRestServletGroup. |
@Body annotation. | Has been renamed to @Content (to better match HTTP naming conventions such as Content-Type/Content-Encoding headers). |
@Query(_default) , @FormData(_default) . | Has been renamed to Query.def / FormData.def. Note however that @RestOp-annotated parameters now also support use of Optional parameters which simplifies the coding of default values. |
@Rest(reqHeaders) . | Has been renamed to Rest.defaultRequestHeaders and added Rest.defaultResponseHeaders. |
@Rest(staticFiles) . | Changed from a string array to a Class<? extends StaticFiles> .If you're extending from BasicRestServlet/BasicRestObject, the getHtdoc() is already implemented for you to provide static files under the sub-URI /htdocs/*. The default implementation for finding static files is BasicStaticFiles which provides basic out-of-the-box functionality, so you can usually just remove the previous @Rest(staticFiles) value. |