The Spring Blog
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!
- Spring Framework Juergen Hoeller has just announced Spring Framework 5.0.5 and 4.3.15 are now available.
- Check out the PR supporting Pact v3 in Spring Cloud Contract.next. Now would be a good time to try it out and feedback!
- PCF 2.1 and the Quest for a One Pizza Ops Team
- Check out this shiny new Kotlin DSL for Spring Data Cassandra!
- Spring Boot lead Phil Webb has published a nice look at property binding in Spring Boot 2.0
- Spring Batch 1.0.0. was released ten years and a week ago, on March 28th, 2018. Happy tenth anniversary, Spring Batch!
- Roy Clarkson has just announced that the Spring Cloud Open Service Broker 2.0.0.M2 is now available. Spring Cloud Open Service Broker is a framework for building Spring Boot applications that implement the Open Service Broker API.
- Ryan Baxter has just announced Spring Cloud Edware SR3 which includes a number of refinements which you should definitely check out!
- GitHub - dsyer/riff-http
- Java 10 migration: Is it a breeze or a tornado? - JAXenter
- Check out this post on using JUnit 5 with Gradle
- This post looks at using Spring Boot 2, Micrometer, Prometheus and Grafana together - check it out!
- It was recently Greg Turnquist’s birthday. Greg is the chap who toils tirelessly on all the amazing http://Spring.io/guides. So, for his birthday, won’t you take a moment and say “thanks”?
- This is an interesting template application that demonstrates how to wire up Spring, JWT, React and Redux together.
- Hey Atlanta, I’ll be there April 10 looking at building reactive microservices with Project Reactor, Spring Boot 2.0, and Spring Cloud Finchley. Check it out!
- This is an oldie-but-a-goodie: it looks at the details of connection pools
- Check out this link for an epic 5 part webinar series on domain-driven design with Spring Boot, event-sourcing, microservices and more.!
- The latest Camunda BPMN Spring Boot Starter (3.0-alpha1) now supports Spring Boot 2.0!
- March 28th, 2018, was the ten year anniversary of Spring Batch 1.0! What a wicked, wonderful journey it’s been since then! Happy birthday, Batch!
- I’m so looking forward to this upcoming webinar on why Spring Boot and Java are magic together on Microsoft Azure
- Lettuce, a Redis driver that you can use with Spring Data Redis, 4.4.4.Final and 5.0.3.RELEASE are out now. 5.0.3.RELEASE fixes a critical Redis Cluster issue that left connections open.
- TL;DR: the Spring Initializr’s use is expanding massively! Over the past 30 days, 38.5% more projects created at http://start.spring.io than the previous month (not year!) before. Well over 850,000 projects, now!
- Check out this SpringOne Platform 2017 talk from Christoph Strobl and Mark Paluch introducing reactive Spring Data
- JAXenter have a nice German-language post on using Micrometer and Spring Boot 2.0 to collect metrics
- Check out this talk on creating reactive applications that can be deployed on Apache Tomcat or any Servlet 3.1 compatible containers from SpringOne Platform 2017
- Hat tip to Matt Stine who says this is the best article he’s read on testing in a long time. Hes right! It’s good
- Check out the second part of my series on building Reactive applications with Spring Boot in Java Magazine this month! (It’s a free download!)
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_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
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!
- Check this Pivotal showcase on object detection with Spring Cloud Stream.
- Spring Security SAML DSL lead Filip Hanik has just announced the 1.0.5.RELEASE of our SAML DSL project. This release works against Spring Security SAML 1.0.4.RELEASE. This release adds a simple Java configuration option to your existing Spring Boot applications.
- Ryan Baxter has just announced Spring Cloud Finchley.M9. This new release includes some nice features in Spring Cloud Gateway including support for rolling deployments and route refresh from service discovery heartbeats.
- Spring Tool Suite lead Martin Lippert has just announced Spring Tool Suite 3.9.3
- Erdem Günay shares the journey of re-platforming Turkcell TV service to Cloud Native within a few months using Spring Boot and Spring Cloud.
- Ryan Dawson looks at application reconfiguration with Spring Cloud Config Server
- The Java Dev Journal has a simple walkthrough introducing Spring Boot
- Shubham Aggarwal has a nice post demonstrating Spring Data JPA with Spring Boot
- The Baeldung has a nice post on property configuration with Spring Boot
- Devoxx founder Stephan Janssen details the use of Spring Boot and Spring Cloud (via JHipster) to revamp a few different Voxxed web properties. Good job Stephan!
- The Sourced Blog has a nice post on implementing the “REST Bucks” example from the canonical tome REST in Practice using Spring. Note, this is not that “REST Bucks” example.
- Spring Auto REST Docs 2.0.0 is out. It is based on Spring REST Docs 2.0.0 and comes with support for Kotlin’s KDoc.
- The Java Code Geeks have a nice post on continuously delivering Spring Boot applications with Jenkins.
- Check out the 0.0.5 release of Pivotal’s function-as-a-service offering, Project Riff. The new release includes a Go function invoker that provides support for functions built as Go plugins, support for improved Python support, HTTP header whitelisting, and so much more.
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!
- We want your feedback on this Spring Cloud Contract proposal to support fetching stubs over different protocols
- Spring Cloud Data Flow ninja Gunnar Hillert has just announced Spring Cloud Data Flow 1.4.0. The new release includes improved dashboards, versioned streams, a new stream deployment builder, support for Docker compose, security improvements, proxy server support for the shell, LDAP Role Mapping support and improved documentation, among other things. This is a massive release with a lot of good stuff, so don’t miss it!
- Spring Security and OAuth-ninja Joe Grandja has just released Spring Security OAuth 2.3.0 which now supports Elliptic Curve signature verification in
JwkTokenStore, among other things.
- Micrometer project lead Jon Schneider gives an amazing introduction to all things Micrometer in this blog. Seriously, go read it. Micrometer is the metrics collection facade that underpins the
/actuator/eventsendpoint in Spring Boot 2+. It is not tied to Spring or Spring Boot, though, and this post is well worth a read no matter what your technical stack.
- Spring Cloud co-founder Spencer Gibb has been toying with integrating Retrofit, as a sort of alternative to using something like Feign. This is a work-in-progress example, but feedback is always valuable and it’s exciting to see what might be coming
- Spring Cloud Open Service Broker lead Scott Frederick has just announced Spring Cloud Open Service Broker 2.0.0.M1. This new release has a Spring Boot 2 baseline, supports both Spring MVC and Spring WebFlux, and provides improved Spring Boot auto-configuration. If you’re building service brokers for Cloud Foundry or Kubernetes, you’re going to want to see this post
- This is a must-read article by Spring Web team ninja Rossen Stoyanchev on the choice between Servlet APIs and reactive APIs for Spring users in Spring MVC and Spring WebFlux: “Spring MVC or Spring WebFlux, which should you use? A perfectly valid question, but one that sets up an unsound dichotomy”
- Java 10 is here! Congrats to the Java team! Get it while its hot! This is the first release to support local type inference (
- The SivaLabs blog continues their look at microservices in Part 6, Distributed Tracing with Spring Cloud Sleuth and Zipkin
- The Trampoline project has been updated to support Spring Boot 2.0
- Asim Aslam likes Project Riff, the function-as-a-service offering from Pivotal. You might, too.
- IBM executive Eric Andersen, tweeting from the IBM Think 2018 event, looks forward to some of the exciting opportunities for Cloud Foundry and the Istio proxy.
- Dhiraj Ray has a nice post over on the Java Code Geeks blog on how to externalize configuration in a Spring application
- Spring Cloud Contract lead Marcin Grzejszczak tweets that, thanks to Olga Maciaszek, you can now understand Spring Cloud Contract in 3 seconds or 3 minutes. There’s also a ten minutes version and a roughly five day version
- Dan Newton has a nice post looking at using the new reactive web runtime Spring WebFlux
- The SivaLabs series on building microservices with Spring Cloud looks, in this fifth post, on at using Spring Cloud Zuul
- Robert Winkler has just released Resilience4j 0.12.0 which upgrades Vavr from Spring Boot from 1.4.3.RELEASE to 1.5.5.RELEASE, among many other dependencies. It also adds a reset method to Circuit Breaker, adds a disable and force_open states to Circuit Breaker, adds Project Reactor support for circuit breaker, bulkhead and rate limiter, adds support for Micrometer, and ensures that the Reactor operators can be used together on a
- Check out our latest post about Spring Boot 2.0 and Micrometer on Touk Team Blog
- Matt McCandless continues his look at using JHipster, which builds upon Spring Boot and Angular. Check it out!
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 to Spring Boot 1.5, 1.4, and 1.3 with the addition of another dependency.
Micrometer adds richer meter primitives to the counters and gauges that existed in Spring Boot 1. For example, a single Micrometer
Timer is capable of producing time series related to throughput, total time, maximum latency of recent samples, pre-computed percentiles, percentile histograms, and SLA boundary counts.
Despite its focus on dimensional metrics, Micrometer does map to hierarchical names to continue to serve older monitoring solutions like Ganglia or narrower scoped tools like JMX. The change to Micrometer arose out of a desire to better serve a wave of dimensional monitoring systems (think Prometheus, Datadog, Wavefront, SignalFx, Influx, etc). One of Spring’s strengths is the enablement of choice through abstraction. By integrating with Micrometer, Spring Boot is enabling you to choose one or more monitoring systems to use today, and change your mind later as your needs change without requiring a rewrite of your custom metrics instrumentation.
Before opting to develop "yet another" metrics collection library, we looked hard at existing or up-and-coming dimensional collectors. But as we looked at exporting to more and more monitoring systems, the importance of the structure of names and data became apparent. Micrometer builds in concepts of naming convention normalization, base unit of time scaling, and support for proprietary expressions of structures like histogram data that are essential to make metrics shine in each target system. Along the way, we added meter filtering as well, allowing you to exercise greater control over the instrumentation of your upstream dependencies.
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:
In this post, I’d like to walk you through the process of upgrading a Spring Boot
1.x app to Spring Boot 2.
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 and upgrade the plugins you are using if necessary.
Spring Web Flow 2.5 is now GA and available for use. This release provides an upgrade path for applications using Web Flow to Spring Framework 5 with Java 8, Servlet 3.1, Hibernate 5, Tiles 3, and JSF 2.2 as minimum requirements.
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