CoreMedia Content Cloud v12 Upgrade Guide / Version 2404
Table Of ContentsCheck your workspace
When you are still using spring.factories
for registering Spring Boot auto-configuration or the @Required
annotation, you have to adapt your code.
CoreMedia CMCC 12 depends on Spring Boot 3.2 (https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes ) which in turn depends on Spring Framework 6 (https://github.com/spring-projects/spring-framework/wiki/What's-New-in-Spring-Framework-6.x).
Spring Framework 6 uses Java 17 on the source level and so does CoreMedia 12. Spring Framework 6 requires Jakarta EE 9 as minimum version. Jakarta EE dependencies have been updated in CoreMedia 12 to meet this requirement. Consequently, most of the existing javax.* imports have been replaced with jakarta.* imports. Prominent examples of such imports which are highly likely to be present in most projects are classes of the javax.servlet package which must be replaced with jakarta.servlet.
Spring Framework 6 changed the injection point resolution implementation so that the compiler flag -parameters
is now mandatory, see https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention
for further details. Add the compiler option <maven.compiler.parameters>true</maven.compiler.parameters>
to project-specific instances of the maven-compiler-plugin and update the project-specific instances of the plugin to version 3.9.0.
The Spring Boot Maven Plugin 3 no longer supports disabling forking. It now always forks a JVM and needs to configure
it using the spring-boot.run.jvmArguments
command line property. See https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/#run
for further details.
Spring Web MVC controller detection changed with Spring Framework 6. Spring Web MVC no longer detects controllers based solely on a type-level @RequestMapping annotation. Use the @Controller annotation instead. See https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#web-applications-1 for further details.
Spring Framework 6 changed configuration class loading. Apps which import a configuration class in another (auto-)configuration class might run into a BeanDefinitionOverrideException if the imported configuration class is configured as an ordinary Spring bean in an imported Spring XML configuration file as well. To overcome this, such bean definition occurrences in Spring XML configuration files can be replaced by component scans. The recommendation is to use a regular expression pattern for the component scan, which narrows down the results to exactly the configuration class which should be replaced by it.
Spring MVC 6 deprecated trailing slash matching and changed the default to false. Therefore, URLs ending on a slash may no longer work as expected and may now lead to a 404. Examples of affected URLs are the Spring Boot actuator URLs. For further details see https://github.com/spring-projects/spring-framework/issues/28552.
Spring Boot 3 removed the support for registering auto-configurations in
spring.factories
using the org.springframework.boot.autoconfigure.EnableAutoConfiguration
key.
Instead, use the META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
file for registering auto-configurations.
For further details see the official upgrade guide.
Spring Boot 3 removed the org.springframework.beans.factory.annotation.Required
annotation.
Use constructor injection or an implementation of org.springframework.beans.factory.InitializingBean
instead.