Migration Guide
Version 2.10.0
- If you have used Wiremock functions and relied on Essencium as the library source, please be aware that implementations may no longer work. To use Wiremock again, you can either integrate
wiremock-standalonedirectly into your application, or refer to the documentation at https://wiremock.org/docs/spring-boot/. - Applications whose implementation uses one of the following libraries must henceforth integrate it themselves:
commons-logging:commons-loggingjakarta.xml.bind:jakarta.xml.bind-apiorg.glassfish.jaxb:jaxb-runtime
- If your application uses the
CheckedMailExceptionpreviously provided by Essencium, you will need to remove it. CheckedMailException previously combined and masked the three exceptionsMailException,TemplateExceptionandIOException. The different nature and causes of these exceptions were no longer identifiable in applications, logs or monitoring systems, making it more difficult to debug the application.
Version 2.9.0
Changed Method Signature
The signature of the method AbstractEntityService.convertDtoToEntity has been extended to include an Optional<OUT> currentEntityOpt, which contains the already persistent entity in the case of an update request. This can be used to carry out any necessary transfers of values from the database or validations.
public abstract class AbstractEntityService<
OUT extends AbstractBaseModel<ID>, ID extends Serializable, IN>
extends AbstractCrudService<OUT, ID, IN> {
/*...*/
// Before migration;
protected abstract <E extends IN> OUT convertDtoToEntity(@NotNull final E entity);
// after migration:
protected abstract <E extends IN> OUT convertDtoToEntity(@NotNull final E dto, Optional<OUT> currentEntityOpt);
/*...*/
}You have to adjust the implementation of the method in your service class accordingly.
AbstractUserController now extends AbstractAccessAwareController
-
The
findByIdmethod inAbstractUserControllerdoes not takeID idparameter anymore. Any calls to theAbstractUserController.findByIdshould be adjusted to omit the paramter. -
The
updateObjectmethod in theAbstractUserControllerclass has been renamed toupdate. Every call to theupdateObject(ID, USERDTO, SPEC)method of theAbstractUserControllershould be replaced withupdate(ID, USERDTO, SPEC).
Example:
// Before
userController.updateObject(id, userDTO, spec);
// After
userController.update(id, userDTO, spec);Version 2.7.0
All implementations of the AbstractUserController should be checked to see whether one of the methods findById, updateObject, update, delete or, terminate have been overwritten. If this is the case, the method signature must be adapted to the use of specifications.
Example:
/* old implementation */
@Override
@GetMapping("/{id}")
@Secured(BasicApplicationRight.Authority.USER_READ)
@Operation(summary = "Retrieve a user by her id")
public UserRepresentation findById(@PathVariable("id") @NotNull Long id) {
// do something
super.findById(id);
}
/* new implementation */
@Override
@GetMapping("/{id}")
@Secured(BasicApplicationRight.Authority.USER_READ)
@Operation(summary = "Retrieve a user by her id")
public UserRepresentation findById(@PathVariable("id") @NotNull Long id,
@Parameter(hidden = true) @Spec(path = "id", pathVars = "id", spec = Equal.class) UserSpec spec) {
// do something
super.findById(id, spec);
}Version 2.6.0
UserService
The used super-constructor in the implementation of the AbstractUserService in your application has a new added parameter AdminRightRoleCache adminRightRoleCache. You have to change the constructor accordingly.
General Migration Tips
- Always read the CHANGELOG before upgrading to understand all changes
- Test thoroughly in a development environment before production deployment
- Back up your database before running migrations
- Review breaking changes in the migration guide for your version
- Update dependencies as specified in the release notes