close

Phil Webb

Phil Webb

Spring Framework commiter

San Francisco

Phil Webb is a Spring Framework developer and co-creator of the Spring Boot project. Prior to joining Pivotal and relocating to California, Phil worked for a number of UK technology companies.
Blog Posts by Phil Webb

Creating Docker images with Spring Boot 2.3.0.M1

Spring Boot 2.3.0.M1 has just been released and it brings with it some interesting new features that can help you package up your Spring Boot application into Docker images. In this blog post we’ll take a look at the typical ways developers create Docker images, and show how they can be improved by using these new features.

Common Docker Techniques

Although it’s always been possible to convert the fat jars produced by Spring Boot into Docker images, it’s pretty easy to make less than optimal results. If you do a web search for "dockerize spring boot app", the chances are high you’ll find an article or blog post suggesting you create a dockerfile that looks something like this:

FROM openjdk:8-jdk-alpine
EXPOSE 8080
ARG JAR_FILE=target/my-application.jar
ADD ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]

Whilst this approach works fine, and it’s nice and concise, there are a few things that are sub-optimal.

The first problem with above file is that the jar file is not unpacked. There’s always a certain amount of overhead when running a fat jar, and in a containerized environment this can be noticeable. It’s generally best to unpack your jar and run in an exploded form.

The second issue with the file is that it isn’t very efficient if you frequently update your application. Docker images are built in layers, and in this case your application and all its dependencies are put into a single layer. Since you probably recompile your code more often than you upgrade the version of Spring Boot you use, it’s often better to separate things a bit more. If you put jar files in the layer before your application classes, Docker often only needs to change the very bottom layer and can pick others up from its cache.

Two new features are introduced in Spring Boot 2.3.0.M1 to help improve on these existing techniques: buildpack support and layered jars.

Read more...

Spring Boot 2.1.x EOL November 1st 2020

With the recent release of Spring Boot 2.2, we’d like to announce that maintenance for Spring Boot 2.1 will end on November 1st 2020.

We’ll keep publishing the occasional maintenance release up until that point, but we recommend that all users consider upgrading to Spring Boot 2.2 as soon as possible. Upgrading to Spring Boot 2.2 from 2.1 should not be too difficult, and upgrade instructions are available on the WIKI.

In order to help track the state of supported releases we’ve also introduced a new “supported versions” WIKI page. You can see at a glance which Spring Boot versions are supported and when they will EOL.

Read more...

Spring Boot 2.1.6 released

On behalf of the team and everyone who has contributed, I am pleased to announce that Spring Boot 2.1.6 has been released and is now available from repo.spring.io and Maven Central.

This is a maintenance release that includes a number bug fixes, dependency updates and documentation improvements.

Remember that Spring Boot 1.5 will be end of life in august, so all users should now be upgrading to Spring Boot 2.1.

How can you help?

If you’re interested in helping out, check out the “ideal for contribution” tag in the issue repository. If you have general questions, please ask on stackoverflow.com using the spring-boot tag or chat with the community on Gitter.

Read more...

Spring Boot 2.1.5 released

On behalf of the team and everyone who has contributed, I am pleased to announce that Spring Boot 2.1.5 has been released and is now available from repo.spring.io and Maven Central.

This is a maintenance release that includes a number of important dependency updates and bug fixes.

A gentle reminder that Spring Boot 1.5 will be end of life in august, so all users should now be upgrading to Spring Boot 2.1.

How can you help?

If you’re interested in helping out, check out the “ideal for contribution” tag in the issue repository. If you have general questions, please ask on stackoverflow.com using the spring-boot tag or chat with the community on Gitter.

Read more...

Spring Boot 2.2 M3 available now

On behalf of the team and everyone that contributed, I am pleased to announce that the third milestone of Spring Boot 2.2 has been released and is available from our milestone repository. This release closes over 100 issues and pull requests.

For a complete list of changes and upgrade instructions, please see the Spring Boot 2.2 Release Notes on the wiki and the updated reference documentation.

If you want to get started with 2.2 and try out the new features, you can bootstrap a new project on https://start.spring.io.

Read more...

Spring Boot 2.1.4 released

On behalf of the team and everyone who has contributed, I am pleased to announce that Spring Boot 2.1.4 has been released and is now available from repo.spring.io and Maven Central.

This is a maintenance release that includes a number of important dependency updates and bug fixes.

Since 1.5 will be end of life in august, all users should now be considering an upgrading to Spring Boot 2.1.

How can you help?

If you’re interested in helping out, check out the “ideal for contribution” tag in the issue repository. If you have general questions, please ask on stackoverflow.com using the spring-boot tag or chat with the community on Gitter.

Read more...

Spring Boot 2.1.2 released

On behalf of the team and everyone who has contributed, I’m happy to announce that Spring Boot 2.1.2 has been released and is is now available from repo.spring.io and Maven Central.

This release includes over 60 fixes, improvements and dependency upgrades. Thanks to all those who have contributed with issue reports and pull requests.

How can you help?

If you’re interested in helping out, check out the “ideal for contribution” tag in the issue repository. If you have general questions, please ask on stackoverflow.com using the spring-boot tag or chat with the community on Gitter.

Read more...

Spring Boot 2.1 M3 available now

On behalf of the team and everyone that contributed, I am pleased to announce that the third milestone of Spring Boot 2.1 has been released and is available from our milestone repository. This release closes 117 issues and pull requests!

This third milestone aligns with Spring Framework 5.1.RC3.

Highlights in this release include:

  • Kafka Streams support
  • Support for non-web OAuth applications
  • Improved conversion service integration
  • Support for logging groups

For a complete list of changes and upgrade instructions, please see the Spring Boot 2.1 Release Notes on the wiki and the updated reference documentation.

Read more...

Spring Boot 1.x EOL Aug 1st 2019

All good things must come to an end, and for the 1.x line of Spring Boot that means we will need to cease maintenance twelve months from today, on Aug 1st 2019.

We will keep publishing occasional 1.5.x maintenance releases up until that point and will then end the branch.

Existing Spring Boot 1.x users should plan accordingly to ensure that they have upgraded to the latest 2.x version before that date. Please also note that Spring Boot 2.0 and above requires Java 8+, so if you’re running Java 6 or 7 you should also plan on upgrading your JDK.

Read more...

Spring Boot 1.5.12 available now

CVE-2018-1270 reported last week was unfortunately not fully addressed in the 4.3.x branch of the Spring Framework. Spring Framework 4.3.16 has been released today, so we’ve decided to also release Spring Boot 1.5.12 to help people upgrade easily.

This release includes just 3 fixed issues, but should be considered a priority upgrade for all existing Spring Boot 1.5 users.

Spring Boot 2.0 users are not affected and should use the existing 2.0.1 release.

Project Page | GitHub | Issues | Documentation | Stack Overflow | Gitter

Read more...