If you’re adopting Spring Framework 6.x then Oracle WebLogic Server 15.1.1 is an excellent target for your enterprise deployments. This is true whether you are upgrading existing applications from an earlier version of Spring and WebLogic Server, such as Spring Framework 5.x and Oracle WebLogic Server 12.2.1.4 or 14.1.2.0 or creating new applications. WebLogic Server ensures that your application deployments are secure, compliant, and compatible. Oracle announced the release of WebLogic Server 15.1.1 in October with support for Jakarta EE 9.1 and Java SE 17 and 21.
Spring Framework and Hibernate Versions
Spring Framework 6.x applications may use certain Spring Framework components, or non-Spring third-party libraries, that depend on Jakarta EE 10 APIs that WebLogic Server 15.1.1 would not ordinarily support. In order to support applications that depend on these third-party libraries, WebLogic Server will deliver support for some Jakarta EE 10 APIs in WebLogic Server 15.1.1.
For instance, Hibernate 6.6.x depends on Jakarta Persistence 3.1, which is the version of the Jakarta Persistence specification that is included with Jakarta EE 10.
WebLogic Server 15.1.1 now includes support for Jakarta Persistence 3.1 allowing support for Hibernate 6.6.x and other Spring Framework components that require this version of Jakarta Persistence. Customers can configure support either to include Jakarta Persistence 3.1 or enable a Jakarta EE 9.1 strict compliance mode that would include Jakarta Persistence 3.0.
OpenRewrite Recipes
Oracle provides tools to upgrade applications to be deployed on WebLogic Server 15.1.1. These tools leverage OpenRewrite.
Customers automatically upgrade their applications by using OpenRewrite recipes, which are flexible and composable so that you can perform translation to use jakarta.* APIs from Jakarta EE 9.1, update to Spring 6.x and Hibernate 6.6.x APIs, account for changes from Java SE 8 or 11 to Java SE 17 or 21, and even upgrade deployment descriptors.
Read more about these recipes on the blog Automated Applications Upgrades for your Oracle WebLogic Server 15.1.1.
Spring Framework PetClinic
The following steps demonstrate how to update and deploy the Spring Framework PetClinic sample application to WebLogic Server. The updates documented here can be automated using the OpenRewrite recipes, including an additional recipe that is specific to the PetClinic application.
Step 1: Clone the official spring-petclinic GitHub project
git clone https://github.com/spring-petclinic/spring-framework-petclinic.git
cd spring-framework-petclinic
Step 2: Update the default servlet handler
Edit the file src/main/resources/spring/mvc-core-config.xml to replace <mvc:default-servlet-handler /> with <mvc:default-servlet-handler default-servlet-name=”DefaultServlet”/>
Step 3: Include configuration to use Jakarta Standard Tag Library 3.0
Create a new file src/main/webapp/WEB-INF/tags/implicit.tld with the contents:
<?xml version="1.0" encoding="UTF-8"?>
<taglib version="3.0" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-jsptaglibrary_3_0.xsd">
<tlib-version>1.0</tlib-version>
<short-name>implicit</short-name>
</taglib>
Step 4: Build
mvn clean package -DskipTests
Step 5: Deploy to WebLogic Server 15.1.1
The application can be deployed to WebLogic Server with no additional configuration and after building the WAR file can be found target/petclinic.war.
Take-Aways
WebLogic Server is committed to supporting modern application frameworks, including Spring Framework 6.x and Hibernate 6.6.x. Our primary goal is to ensure seamless upgradeability to newer framework versions and their dependencies. To help you keep your applications secure, compliant, and compatible, we offer new automated tools and migration guides for upgrading WebLogic applications that depend on the latest frameworks and Jakarta APIs. Stay tuned for upcoming blog posts announcing the latest updates in this area.
