Appendix A. Using Spring Boot with Java EE

In this appendix we’ll look at how to integrate Spring Boot applications with Java EE. Java EE, for our purposes, is an umbrella name for a set of APIs and, sometimes, runtimes—Java EE application servers. Java EE application servers, like Red Hat’s WildFly AS— the application server formerly named JBoss Application Server—provide implementations of these APIs. We’ll look at how to build applications that leverage Java EE APIs outside of a Java EE application server. If you’re building a brand new application today, you don’t need this appendix. This appendix is more useful for those with existing functionality trapped in an application server who want to move to a microservices architecture. For a broader discussion of moving (“forklifting”) legacy applications to a cloud platform like Cloud Foundry with minimal refactoring, see Chapter 5.

Spring acts as a consumer of Java EE APIs, where practical. It doesn’t require any of them. Wherever possible, Spring supports consuming Java EE APIs à la carte, independent of a full Java EE application server. Spring applications should ideally be portable across environments, including embedded web applications, application servers, and virtually any Platform as a Service (PaaS) offering.

Compatibility and Stability

Spring 4.2 (the baseline release for Spring Boot 1.3 and later) supports Java SE 6 or later (specifically, the minimum API level is JDK 6u18, which was released in early 2010). Oracle ...

Get Cloud Native Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.