Spring Boot — how to deploy on Oracle Weblogic 12.1.3

Raphael Rodrigues
SouJava {Rio}
Published in
3 min readApr 12, 2019

We have one specific client who has a bunch of applications running in a Weblogic 12.1.3 middleware.

Weblogic 12.1.3 is a Java EE 6 application server and it has support for JPA. However, in this specific version JPA1.0 is enable for default. You can enable Java EE 7 features such as JPA2.1 in this particular version of WLS in a pretty straightforward way. It is well documented in this link:

In this specific client we would not have a possibility to enable JPA2.1 , because there are legacy applications running in the same domain. Because of this, our idea was developing a spring boot application compatible with JPA1.0.

The current stable version of spring boot in 1.x release is “1.5.19”. Let’s work with this particular version step by step.

1- Maven pom.xml

2. Right now we are added the Eclipselink default implementation in WLS

3. We need to add weblogic.xml file in the ‘src/main/webapp/WEB-INF’ folder with your context-root written.

4. Let’s add all prefered packages in weblogic.xml file

5. We have to specify the Persistence provider which the application will be using in the weblogic.xml file.

6. Implement WebApplicationInitializer like this:

It is ok for now and you should be able to deploy in WLS12.1.3. Before we end , there are a few details:

  1. In this JPA version, we do not have method like “Optional<T> findById in CrudRepository, you have to substitute for T findOne();
  2. Hibernate validation annotations do not exist;
  3. SpringBootServletInitializer in in a different package in this release;

So far so good!

--

--

Raphael Rodrigues
SouJava {Rio}

programming, data science, trading, productivity, leadership