close

This Week in Spring - February 4th, 2020

Hi, Spring fans! Welcome to another installment of This Week in Spring! I just finished spending a wonderful afternoon with customers and now I’m pouring through all the wonderful new content for this week. As usual, we’ve got a lot to cover so let’s get to it!

Read more

Spring Cloud App Broker 1.1.0.M1 Released

We are pleased to announce the release of Spring Cloud App Broker 1.1.0.M1. Thanks to the community for your feedback and contributions! This release includes the following fixes and enhancements:

  • Upgrade to Spring Boot 2.2.4.RELEASE
  • Upgrade to Spring Cloud Open Service Broker 3.1.0.RELEASE
  • Upgrade to Cloud Foundry Java Client 4.1.0.RELEASE
  • Log warnings when auto-configuration enables an ServiceInstanceStateRepository or ServiceInstanceBindingStateRepository
  • Document example implementation of ServiceInstanceStateRepository and ServiceInstanceBindingStateRepository
  • Update reference docs to use new Spring docs style
  • Exclude tests from docs and distribution zips
  • Replace InMemory repository Map data structure
  • Truncate app name if too long when using ServiceInstanceGuidSuffix
  • UpdateServiceInstance will now create and bind new backing services, and unbind and delete old backing services
  • Fix reference documentation publication
  • Support custom BrokeredServices to be injected by custom configuration
  • Add support to configure API polling duration to support async backing services
  • Support a brokered service without a backing application
  • Migrate to Reactive Spring CredHub APIs
  • Allowing ServiceInstanceService as a provided Service
  • Enable Blockhound
Read more

Spring Session Dragonfruit-M1, Corn-SR1 and Bean-SR9 Released

On behalf of the community I’m pleased to announce the releases of Spring Session Dragonfruit-M1, Corn-SR1 and Bean-SR9.

Spring Session Dragonfruit-M1

The Dragonfruit-M1 release is based on:

  • Spring Session core modules 2.3.0.M1

  • Spring Session Data Geode 2.3.0.M1

  • Spring Session Data MongoDB 2.3.0.M1

Additional details of these releases can be found in the changelog.

Spring Session Corn-SR1

The Corn-SR1 release is based on:

  • Spring Session core modules 2.2.1.RELEASE

  • Spring Session Data Geode 2.2.2.RELEASE

  • Spring Session Data MongoDB 2.2.2.RELEASE

Additional details of these releases can be found in the changelog.

Read more

Spring Boot for Apache Geode & Pivotal GemFire 1.1.5.RELEASE, 1.2.4.RELEASE and 1.3.0.M1 are available

On behalf of the Spring, Apache Geode and Pivotal GemFire communities, it is my pleasure to announce the release of Spring Boot for Apache Geode and Pivotal GemFire (SBDG) 1.1.5.RELEASE, 1.2.4.RELEASE and 1.3.0.M1.

In addition to support for Apache Geode and Pivotal GemFire, SBDG has dedicated support for, and works seamlessly with, Pivotal Cloud Cache as well. See here for more details. The importance of this project goal cannot be overstated.

SBDG 1.1.5.RELEASE builds on the latest Spring Boot 2.1.12.RELEASE and is based on Spring Framework 5.1.13.RELEASE, Spring Data Lovelace-SR15 (SDG), Spring Session for Apache Geode & Pivotal GemFire (SSDG) 2.1.8.RELEASE, Spring Test for Apache Geode & Pivotal GemFire (STDG) 0.0.8.RELEASE along with Apache Geode 1.6.0 and Pivotal GemFire 9.5.4.

Read more

Spring Session for Apache Geode & Pivotal GemFire 2.1.8.RELEASE, 2.2.2.RELEASE and 2.3.0.M1 are now available

On behalf the Spring, Apache Geode and Pivotal GemFire communities, it is my pleasure to announce the release of Spring Session for Apache Geode and Pivotal GemFire (SSDG) 2.1.8.RELEASE, 2.2.2.RELEASE as well as the 2.3.0.M1 release.

It should also be noted that SSDG works with Pivotal Cloud Cache as well. Pivotal Cloud Cache is powered by Apache Geode. Spring Boot for Apache Geode (SBDG) makes configuring and using Spring Session for Pivotal Cloud Cache a simple matter. See here and here for more details.

Read more

Spring Cloud Greenwich Service Release 5 (SR5) is available.

On behalf of the community, I am pleased to announce that the Service Release 5 (SR5) of the Spring Cloud Greenwich Release Train is available today. The release can be found in Maven Central. You can check out the Greenwich release notes or the Spring Cloud Project for more information.

Notable Changes in the Greenwich Release Train

This release contains bug fixes, minor enhancements and documentation updates.

This is the final scheduled release for the Greenwich Release Train (see here for more details). We reccomend you upgrade to Hoxton as soon as possible. Greenwich.SR5 is based on Spring Boot 2.1.12.

Read more

This Week in Spring - January 28th, 2020

Hi, Spring fans! How’re things, my friends? Can you believe we’re already nearly at the end of January? I have been knee-deep in code and coffee for these last several days and I’m running late for a meeting so, without further ado, let’s get to it!

Read more

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