Version 5.15.0 of the Expanders brings quite a few new features and improvements! This post will cover an overview of what's new and provide a migration guide to assist in updating. The full release notes can be found here.
Resources
The expansion resources below provide Expanders 5.15.0
.
Resource | Version |
---|
Expanders | 5.15.0 |
nsx-default-stack | 2022.15.0 |
rest-jaxrs-stack | 3.4.1 |
Due to some structural changes in the way Struts is packaged, it is recommended to update to one of the listed stack
resources. It is also recommended to update expanders-maven-plugin
to at least version 2022.5.2
.
Changes and improvements
Changes in GlobalOptionSettings
Several of the settings in GlobalOptionSettings have been replaced with options on the ApplicationInstance.
The long-term goal is to make the GlobalOptionSettings, TechnicalInfrastructure, PresentationSettings and BusinessLogicSettings obsolete.
BeanInterfacePolicy
The beanInterfacePolicy setting could either be BOTH, LOCAL or REMOTE and controls which interfaces are present on the bean.
However, in practice, only the LOCAL and BOTH settings were functional.
The option ejb.interfaces.localOnly
replaces beanInterfacePolicy='LOCAL'
, while beanInterfacePolicy='BOTH'
becomes the default.
Security Options
The following flags have been migrated to options:
enforceHttpMethod
: replaced by option struts.security.enforceHttpMethod
(Prevents requests to struts control layer from using the wrong HTTP Method.)
useCsrfProtection
: replaced by option struts.security.csrfProtection
(Adds a security mechanism to protect against CSRF attacks.)
useJavaEESecurity
: replaced by option struts.security.custom
, or simply remove account
Component from the Application. (Removes login mechanism from the struts-header.xml
file.)
GenerateArtifactLabel
This feature added a postfix to the versions of Component artifacts in the project.
This allows you to install artifacts or deploy them to the nexus so speed up subsequent maven builds by using e.g. the -Pslim
profile.
The flag has been replaced by the option mvn.version.appendUniqueLabel
.
It also now appends the applicationInstance shortname and expanders version, instead of the names of the settings objects.
This change is necessary if we want to move away from the settings elements.
CounterDefault
The counterDefault settings on GlobalOptionSettings used to support a GLOBAL
value.
This would cause all of the id's to be set programmatically based on a single table.
This has been removed as there are better alternatives (see below).
Identity generation strategy for JPA
The options persistence.identifier
, persistence.sequence.name
and persistence.sequence.schema
have been renamed from options previously marked as experimental
.
These options allow a specific identity generation strategy to be selected for a DataElement.
The options are available at any level of the model above DataElement and cascaded down.
They can be overridden on a lower level for granular control if needed.
The options support either auto-incremented identity columns or native sequences.
For more information, visit the documentation about id generation.
Struts2 6.0
Support for Struts2 6.0.3 was added to the expanders and is now the default version.
From this version and onward, the expanders will start supporting a specific contemporary release version of Struts to improve the distribution of security patches.
There are some breaking changes both in how we handle Struts and the framework itself. See the migration guide for more information.