This Week in Spring - April 3, 2018

Engineering | Josh Long | April 03, 2018 | ...

Hi Spring fans! What a week! This week I'm in beautiful Dallas, TX, for the Spring One Tour Dallas event which is, like so many of the other cities already, utterly and completely sold out! What a crowd!

And, so, without further ado, let's get to it!

Property Binding in Spring Boot 2.0

Engineering | Phil Webb | March 28, 2018 | ...

Since the first release of Spring Boot, it has been possible to bind properties to classes by using the @ConfigurationProperties annotation. It has also been possible to specify property names in different forms. For example, person.first-name, person.firstName and PERSON_FIRSTNAME can all be used interchangeably. We call this feature “relaxed binding”.

Unfortunately, in Spring Boot 1.x, “relaxed binding” turned out to be a little bit too relaxed. It was quite hard to define exactly what the binding rules were and when specific formats could be used. We also started to get reports of issues that were very hard to fix with our 1.x implementation. For example, in Spring Boot 1.x it is not possible to bind items to a java.util.Set

This Week in Spring - March 27th, 2018

Engineering | Josh Long | March 27, 2018 | ...

Hi Spring fans! Welcome to another installment of This Week in Spring! This week I'm hanging out in sunny San Francisco talking to local customers and working on more installments of the next season of Spring Tips.

As usual, we've got a lot to cover so let's get to it!

This Week in Spring - March 20th, 2018

Engineering | Josh Long | March 21, 2018 | ...

Hi Spring fans, and welcome to the first day of the Spring season! This week I'm in San Francisco visiting some customers and just hanging out, working on new Spring Tips installments, enjoying the amazing weather. As if today wasn't exciting enough, Java 10 also shipped today! I know that all seems like enough already, but read on as we have a lot of good stuff this week!

Micrometer: Spring Boot 2's new application metrics collector

Engineering | Jon Schneider | March 16, 2018 | ...

Table of Contents

What is it?

Micrometer is a dimensional-first metrics collection facade whose aim is to allow you to time, count, and gauge your code with a vendor neutral API. Through classpath and configuration, you may select one or several monitoring systems to export your metrics data to. Think of it like SLF4J, but for metrics!

Micrometer is the metrics collection facility included in Spring Boot 2’s Actuator. It has also been backported

This Week in Spring - March 13th, 2018

Engineering | Josh Long | March 13, 2018 | ...

Hi Spring fans! Welcome to another installment of This Week in Spring! This week I'm in blizzard-besieged Boston, Massachusetts, for the epic Spring One Tour Boston event. Unfortunately, due to this crazy snow storm / blizzard, the event's been postponed one day as we all grapple with the weather. Hope you were able to join the Spring Boot 2.0 launch webinar! If not the replay will be available here and don't forget to check out the launch blog!

Snow or no snow! The show must go on, at least here on the Spring blog, so without further ado:

Upgrading start.spring.io to Spring Boot 2

Engineering | Stéphane Nicoll | March 12, 2018 | ...

Spring Boot 2 was released recently and the production instance of Spring Initializr (start.spring.io) was upgraded to Spring Boot 2 the same day.

In this post, I'd like to walk you through the process of upgrading a Spring Boot 1.x app to Spring Boot 2.

Release notes and migration guide

A good first step is to get yourself familiar with the main changes in Spring Boot 2 by reading the migration guide and the release notes.

Build upgrade

If you are using Maven and the spring-boot-starter-parent, you need to be aware that several plugins are going to be updated as part of the upgrade. If you're not using the parent, it is worthwhile to inspect your build and upgrade the plugins that you are using. Spring Initializr is built with Maven so the easiest way is to scan spring-boot-dependencies

Testing auto-configurations with Spring Boot 2.0

Engineering | Madhura Bhave | March 07, 2018 | ...

Auto-configuration is one of the most powerful features of Spring Boot. Tests for auto-configuration classes usually follow the same pattern. Most tests start up an ApplicationContext with the auto-configuration class under test and depending on the test, also load additional configuration to simulate user behavior. The recurrence of this pattern can add a lot of repetition in the code base.

Spring Boot 2.0 provides a suite of new test helpers for easily configuring an ApplicationContext to simulate auto-configuration test scenarios. The following example configures an ApplicationContextRunner to test the UserServiceAutoConfiguration

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all