Spring Boot 3
The steps below will describe most relevant changes to Valtimo. However, please also check the following guides when running into issues:
As a consequence of the Spring Boot 3 upgrade, some other frameworks / dependencies were also upgraded. Each chapter below describes the changes for the relevant framework or dependency.
Spring Boot 3 / Spring 6
Java 8 is no longer supported. Please use Java 17.
@Controlleror@RestControllerannotations are now mandatory.When declaring the controller beans via autoconfiguration, please also annotate the controller with
com.ritense.valtimo.contract.annotation.@SkipComponentScanto prevent duplicated beans.
javaxpackages changed tojakarta.@ConstructingBindingon no longer supported/needed for@ConfigurationPropertiesclasses.
Spring Security 6
HttpSecurity.authorizeRequestshas been deprecated.When implementing the
HttpSecurityConfigurer, this cannot be mixed with the replacement (authorizeHttpRequests).
Before:
http.authorizeRequests()
.antMatchers(GET, "/api/v1/ping").permitAll()New:
http.authorizeHttpRequests { requests ->
requests.requestMatchers(antMatcher(GET, "/api/v1/ping")).permitAll()
}WebSecurityConfigurerAdapterhas been removed.Removed
CoreHttpSecurityConfigurerAdapter. This has been replaced byValtimoCoreSecurityFactory.
AuthorizedUrl.acccess(..)no longer supports expressions as an argument.WhitelistIpRequesthas been replaced byWhitelistIpRequestMatcher. An example can be found inCamundaCockpitHttpSecurityConfigurer.
Cockpit is now whitelist-secured again. Support for CIDRs added to support a range of addresses.
A list of hosts can be set at
valtimo.security.whitelist.hosts.
Removed
AuthenticationSecurityConfigurer. No replacement other than implementing aSecurityFilterChaindirectly.OpenAPI endpoint
/v3/api-docsis now only available toROLE_DEVELOPER.
Hibernate 6
Overriding entity properties is no longer supported.
As a result,
ProcessLinkimplementations can no longer be adataclass and cannot override the base properties ofProcessLink.Methods previously generated by the
datatype likeequals(other: Any?),hashCode()andcopy(...)should be migrated accordingly.SimpleJpaRepository.deleteByIdnever followed spec to ignore not-found entities. This has been fixed in Hibernate 6. The existing endpoints will follow the new JPA behaviour to make the action idempotent:DELETE /api/v1/choice-fields/{non-existent-id} -> 200
DELETE /api/v1/choice-field-values/{non-existent-id} -> 200
DELETE /api/management/v1/dashboard/{non-existent-id} -> 204
DELETE /api/v1/form-management/{non-existent-id} -> 204
Changes to
application.yaml:Removal of
spring.jpa.hibernate.naming.physical-strategy. No replacement needed.Removal of
spring.jpa.hibernate.naming.implicit-strategy. No replacement needed.Removal of
spring.jpa.hibernate.use-new-id-generator-mappings. No replacement needed.
AuditRecordRepository.findByEventAndDocumentId(List<Class<? extends AuditEvent>> eventTypes, UUID documentId, Pageable pageable);changed toAuditRecordRepository.findByEventAndDocumentId(List<String> eventTypes, UUID documentId, Pageable pageable);
Other
Camunda History TTL is now required by default. Either:
Set the camunda:historyTimeToLive via the modeler or XML.
Set the application property
camunda.bpm.generic-properties.properties.enforceHistoryTimeToLivetofalseif you don't want to enforce a TTL.
Mockito 5 vararg matching has changed.
Last updated