You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2022/10/08 18:48:57 UTC
[juneau] branch master updated: Add migration guide.
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new ab2a10b3a Add migration guide.
ab2a10b3a is described below
commit ab2a10b3a2ce1c4d60d66b1dd60dc07f26249224
Author: JamesBognar <ja...@salesforce.com>
AuthorDate: Sat Oct 8 14:45:52 2022 -0400
Add migration guide.
---
.../docs/Topics/19.v9.0-migration-guide.html | 87 ++++++++++++++++++++++
1 file changed, 87 insertions(+)
diff --git a/juneau-doc/docs/Topics/19.v9.0-migration-guide.html b/juneau-doc/docs/Topics/19.v9.0-migration-guide.html
new file mode 100644
index 000000000..f59b4f92e
--- /dev/null
+++ b/juneau-doc/docs/Topics/19.v9.0-migration-guide.html
@@ -0,0 +1,87 @@
+<!--
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+ -->
+
+{title:'v9.0 Migration Guide'}
+
+<div class='topic'>
+ <p>
+ The following guide can be used to help migrate your code to v9.0:
+ </p>
+ <table>
+ <tr>
+ <th>
+ Old
+ </th>
+ <th>
+ New
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <ja>@RestMethod</ja> annotation.
+ </td>
+ <td>
+ Has been replaced with {@link oajr.annotation.RestOp}, {@link oajr.annotation.RestGet}, {@link oajr.annotation.RestPut}, {@link oajr.annotation.RestPost}, {@link oajr.annotation.RestDelete}, {@link oajr.annotation.RestOptions}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <c>BasicRestServletJena</c>/<c>BasicRestServletJenaGroup classes.
+ </td>
+ <td>
+ These have been removed in 9.0 due to the removal of the Jena packages (due to security issues). Replace
+ with {@link oajr.servlet.BasicRestServlet} and {@link oajr.servlet.BasicRestServletGroup}.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ja>@Body</ja> annotation.
+ </td>
+ <td>
+ Has been renamed to <ja>@Content</ja> (to better match with Content-Type/Content-Encoding header names).
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ja>@Query(_default)</ja>/<ja>@FormData(_default)</ja>.
+ </td>
+ <td>
+ Has been renamed to <ja>@Query(def)</ja>/<ja>@FormData(def)</ja>. Note however that <ja>@RestOp</ja>-annotated parameters
+ now also support use of Optional parameters which simplifies the coding of default values.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ja>@Rest(reqHeaders)</ja>.
+ </td>
+ <td>
+ Has been renamed to <ja>@Rest(defaultRequestHeaders)</ja> and added <ja>@Rest(defaultResponseHeaders)</ja>.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ja>@Rest(staticFiles)</ja>.
+ </td>
+ <td>
+ Changed from a string array to a <c>Class<? <jk>extends</jk> StaticFiles></c>. If you're extending from
+ {@link oajr.servlet.BasicRestServlet}/{@link oajr.servlet.BasicRestObject}, the {@link oajr.servlet.BasicRestOperations#getHtdoc(String,Locale)}
+ is already implemented for you to provide static files under the sub-URI <js>/htdocs/*</js>. The default implementation for finding
+ static files is {@link oajr.staticfile.BasicStaticFiles} which provides basic out-of-the-box functionality, so you can usually
+ just remove the previous <ja>@Rest(staticFiles)</ja> value.
+ </td>
+ </tr>
+ </table>
+
+</div>
\ No newline at end of file