Migrating from 3.x to 4.0.0 (Draft)
Upgrade Summary:
-
stay at Java 17 baseline (as Spring does; however, JRuby 10.x as used for AsciiDoc extensions requires Java 21+ runtime)
-
upgrade to Jackson 3 (as Spring does)
-
upgrade to JUnit 6 (as Spring does)
-
Shiro support removed ✅
-
JDO support removed ✅
-
Joda time support removed ✅
-
RestEasy integration removed ✅
-
Causeway now uses slf4j (instead of log4j) ✅
-
Migrate build requirements to Maven 4 ✅
-
ditch rest-client artifact in favor of Spring’s RestClient (optional)
-
ditch encrypt-jbcrypt artifact (optional)
Configuration
Some presets for the Spring Configuration have been removed
| Removals |
|---|
|
|
RestEasy Integration Removed
<!-- REMOVED
<dependency>
<groupId>org.apache.causeway.viewer</groupId>
<artifactId>causeway-viewer-restfulobjects-jaxrsresteasy</artifactId>
</dependency>
-->
<!-- USE INSTEAD -->
<dependency>
<groupId>org.apache.causeway.viewer</groupId>
<artifactId>causeway-viewer-restfulobjects-viewer</artifactId>
</dependency>
@Import({
//..
// REST
// CausewayModuleViewerRestfulObjectsJaxrsResteasy.class <-- REMOVED
CausewayModuleViewerRestfulObjectsViewer.class, // <-- USE INSTEAD
})
#configures the servlet-context relative path prefix for the _Restful Objects Viewer_
# removed ..
#resteasy:
# jaxrs:
# defaultPath: /restful
#
causeway:
viewer:
restfulobjects:
basePath: /restful
Immutable Configuration
CausewayConfiguration was refactored using Java records over regular classes,
in effect all accessors have been renamed, stripping any get or is prefixes.
CausewayConfiguration is now immutable.
ErrorDetails
ErrorDetails as used by the ErrorReportingService has been converted from a class to a record.
(In effect all accessors have been renamed, stripping any get or is prefixes)
Object Icon Support
Object support method FontAwesomeLayers iconFaLayers() has been replaced by IconResource icon(IconWhere iconWhere),
which also supports image data embedding and supersedes String iconName().
However, the latter is still supported for backward compatibility.
With TitleService method
String iconNameOf(final Object domainObject) was replaced by
IconResource iconOf(Object domainObject, IconWhere iconWhere).
Likewise IconUiEvent was updated to reflect the new programming model.