Hi, Spring fans! Welcome to another installment of This Month in Spring! How are you doing? I hope you've had a wonderful week since we last spoke. I've had a ton of fun! Springtime is officially here in the northern hemisphere. Heck, it's almost summer. The 3rd of May marked the 20th anniversary of the
JdbcTemplate, which I think is super cool! Happy birthday,
JdbcTemplate was important to a lot of people because it's one of those great little utilities that made it easy to justify pulling Spring into applications almost two decades ago. It also helped people learn a lot about some of the design patterns that Spring was trying to make commonplace.
And as time marches on, we celebrate Java's 26th birthday! I can't believe it! I'll be on a livestream with the Java team's Billy Korando on Saturday, the 29th of May, talking about Spring, Java, and so much more. Join us! We're going to be talking about this, that, and the rest. You know, the usual stuff. There's a ton of stuff to talk about, too.
Did you see the new* Spring Boot 2.5* release? It's packed with useful features, among which one of my favorites is the new sanitized database initialization. Previously, you could put a file,
src/main/resources/data.sql, and Spring Boot would pick it up and initialize your JDBC
javax.sql.DataSource. Neat! But what about R2DBC and its reactive
ConnectionFactory instances? No dice. How did the
data.sql interact with Hibernate's automatically created DDL? I only needed to use this feature ever so often so it was always surprising to me which way it would go. Thankfully, all of that is much simpler (
schema.sql are evaluated before Hibernate kicks in, though you can defer it to after), and R2DBC
ConnectionFactory instances are supported now too.
Hot on the tail of Spring Boot 2.5 is the new Spring Native 0.10.0 release which has a ton of neat features.
The core conceit of the GraalVM native image builder is to statically analyze your code and strip away everything that the native image builder can't be sure is used at runtime. It strips away all the extra types on the classpath, all the extra types in the JRE, etc. It keeps only what it can be sure you're using. This is a problem, of course, because Java applications are dynamic. Java has a runtime that lets them dynamically register and unregister types, and synthesize types anew from whole cloth. You can dynamically synthesize a new class for the classloader, and then load that class from the classloader using
Class.forName(String), etc. You can then serialize that class to a stream of
bytes. You might create JDK proxies out of the resulting type if its an interface. GraalVM lets us have our cake and eat it too: we can provide it configuration to tell it to retain the classes it might not otherwise retain, allowing our applications to retain their dynamic quality. Spring Native knows about, and automatically provides this required GraalVM configuration for, typical Spring Boot applications.
So far, Spring Native has worked very well for a ton of use-cases. Spring Native offers a programmatic way to register the configuration that GraalVM expects for JNI, serialization, reflection, and JDK proxies. The trouble is that Spring applications can use both JDK proxies, which are limited to interfaces, and class-targeting proxies, that synthesize a new class by dynamically subclassing a type at runtime. GraalVM didn't know what to do with these Spring- and framework-specific class-targeting proxies, and so things like AOP, Spring Security's
@PreAuthorize on a class that didn't implement any interfaces, etc., just didn't work. Until now.
I love Spring Native. It's gotten to the point where I sometimes spend time, for no reason at all, working on building Spring Native integrations for other projects; it really makes some third-party abstractions come alive! It's hard to know what the right comparison is. There's not much you can do in this life that results in such an instantaneous, night-and-day difference in performance and memory profile with so few (user-visible) changes. Imagine snapping your fingers and having your luxury hypercar (Spring Boot in this metaphor) transform into an equally capable, and very comfortable, rocket ship capable of interstellar travel. That's the sort of paradigm shift implied by Spring Native. Or, at least it feels like that to me! What a wonderful time to be alive.
Anyway, we've got a ton of stuff to get to - this last month was jam-packed with fun stuff, so let's dive right into it!
- I spoke to developer advocate extraordinaire James Ward. He's my mentor and friend and a hero in the Java community. Listen. You won't be sorry. Here it is: A Bootiful Podcast, with James Ward. Also: tomorrow, May 29th, is his birthday! Wish him a happy birthday on Twitter (@_JamesWard)
- This was cool to see: A Spring Boot tutorial
- A recipe to fix CSRF issues in Spring applications
- Check out this upcoming event: DVT TechTalk- Build a Spring Boot based microservice to Azure Spring Cloud Tickets, Tue, Jun 1, 2021 at 11:00 AM | Eventbrite
- Wanna see me live? Don't miss this performance of Cloud Native Java! It's there. Just note the countdown timer and join me for that viewing.
- Not related to Spring, per se, but this is very interesting: Enabling Java: Windows on Arm64 – a Success Story!
- Improve your Spring Boot error handling
- Kai Tödter just released version 0.17.0 of JSON:API for Spring HATEOAS
- Baeldung has a nice, quick guide to Spring bean scopes
- the Okta Developer blog has a nice post, R2DBC and Spring for Non-Blocking Database Access : check it out!
- Spring Batch 4.2.7 and 4.3.3 are out!
- Spring Boot 2.4.6 available now
- Spring Boot 2.5 is now GA
- Spring Integration 5.5 goes GA
- Spring Integration for AWS 2.5 goes GA
- Spring and Isomorphic React 4: Render Data on the Server Side | Developing Software Together
- Don’t miss these Java sessions at Microsoft Build Conference. Expect exciting announcements! Register now - all free, all virtual.
- Both Java 11 and Java 16 builds of OpenJDK for x64 are GA. Java 16 builds for AArch64 (ARM64) are Early Access. Java 11 is a Long-Term Supported version until at least 2024.
- A Bootiful Podcast: Axon Framework Founder Allard Buijze on CQRS, Sagas, and more
- A cool video demonstrating Spring Native
- Automate Spring Boot application deployments to Azure!
- Blog: Using Finalizers to Control Deletion
- Check out the latest version of the HAL explorer
- Check out the recording of my talk with Julien Dubois, and Rory Preddy
- Live Webinar - From MVC to Reactive - Registration
- Modern Web Development - DZone Trend Report
- Move out workshops generation · Issue #249 · spring-cloud-samples/spring-cloud-contract-samples · GitHub
- Spring AMQP 2.2.17.RELEAE & 2.3.7 available
- Spring Data 2021.0.1 and 2020.0.9 released
- Spring Framework 5.3.7 and 5.2.15 available now
- Spring HATEOAS 1.2.6 and 1.3.1 released
- Spring LDAP 2.3.4 released
- Spring Security 5.5 goes GA
- Spring for Apache Kafka 2.5.13.RELEASE, 2.6.8 & 2.7.1 available
- SpringOne Tour: Booternetes II - May 12, 2021. Join me - Josh Long, Mark Heckler, Mario Gray, David Turanski, Tiffany Jernigan, Chris Sterling, Nate Schutta, and special guest star Joe Beda, co-founder of Kubernetes, for this epic introduction to the ways
- The team I work on is hiring (in the US only, sadly)! Join me and the rest of the epic team and let's change the world together!
- Automate Spring Boot app deployments to Azure. Use Blue-Green to reduce downtime and risk. Automate end-to-end! Create a pipeline using Azure Pipelines
- Want to learn more about Java on Microsoft Azure? Join the "Ask the #Java Experts" live session at #MSBuild with: Asir Selvasingh, Bruno Borges, and many others
- Check out this talk on the Microsoft build of OpenJDK and other useful Java things on VS Code and Azure.
- A Bootiful Podcast: Friend, fellow Spring Developer Advocate, Kotlin Google Developer Expert, and Java Champion, Mark Heckler
- Check out the recording of my talk with Microsoft's Julien Dubois, and Rory Preddy on Azure Spring Cloud
- Five compelling reasons to submit a proposal to speak at VMworld 2021
- Kevin Viglucci on Twitter: "Just merged a PR that adds the start of a guides section to the #RSocket website. This includes an initial pass at an rsocket-js guide. Hopefully adding other language impls as time allows. Please don't hesitate to provide feed
- Spring Authorization Server 0.1.1 available now
- Spring Cloud Gateway for Kubernetes
- SpringOne Tour Booternetes Europe
- They’re going to be publishing a Spring for Kafka course soon!
- I loved this video that, among other things, looked at the new Java records
- A Bootiful Podcast: Oracle's Dilip Krishnan about Spring Fox, the Oracle Cloud Lift team, and more
- A cool tutorial on JHipster 7!
- Creating fully reactive applications with R2DBC and MariaDB
- I did a talk for the DevX conference, "Cloud Native Java," in 20 minutes! Watch it here
- In which Mr. Spring, Juergen Hoeller himself, looks at the future of Spring Framework and Java modules
- Spring Cloud Gateway for Kubernetes
- Spring Security 5.5.0-RC2 released
- U.S. Army Futures Command Partners with VMware to Create Software Factory
- Learn how to enable asynchronous messaging at cloud scale in Spring Boot Java apps using Java Message Service (JMS) API and Azure Service Bus.
- In this A Bootiful Podcast, I talked to Reliably CEO Russ Miles
- An awesome hands-on-lab of using Cloud Native buildpacks with Spring Boot by Toshiaki Maki
- Check out Sam Brannan’s epic wiki page on meta programming with Spring
- I love this utility for Google Chrome-using Spring Boot developers from Spring Cloud AWS contributor and legend Maciej Walkowiak: a tiny extension that points you to the current version of the Spring documentation.
- Check out the release notes for Spring Boot 2.5.0-RC1
- Spring Cloud Hoxton.SR11 has been released
- What's new in Spring Data 2021.0?
- A neat VS Code extension that allows you to record and playback guided tours of codebases, directly within the editor.
- Blog: Evolving Kubernetes networking with the Gateway API
- Blog: Graceful Node Shutdown Goes Beta
- Blog: Kubernetes 1.21: Metrics Stability hits GA
- Looking into the JDK 16 vector API
- Microsoft Build of OpenJDK 11.0.11 and 16.0.1 (EA) Now Available
- Oracle Java SE Support Roadmap - Oracle is offering extended support for Java 8 until 2030
- This is an interesting article by Ben Evans on how the JVM executes bytecode
About the AuthorFollow on Twitter Visit Website More Content by Josh Long