The Spring Blog

Engineering
Releases
News and Events

Lazy Initialization in Spring Boot 2.2

The recently announced first milestone of Spring Boot 2.2 introduces support for lazy initialization. This post describes the new functionality and explains how and when to enable it.

What Does it Mean to be Lazy?

Spring Framework has had support for lazy bean initialization since before its source code moved to Git 11 years ago. By default, when an application context is being refreshed, every bean in the context is created and its dependencies are injected. By contrast, when a bean definition is configured to be initialized lazily it will not be created and its dependencies will not be injected until it’s needed.

Read more...

This Week in Spring - March 12th, 2019

Hi Spring fans! What a week! I’m in Seattle, Washington where I’ve been spending time with Pivotal partner Microsoft talking about all things Spring, Cloud Foundry and Azure, and then tonight I spoke at the Seattle Java User Group on Reactive Spring.

Tomorrow morning I’m off to jolie Montreal, Canada for the epic ConFoo conference. Are you going to be around? Say hi!.

Anyway, without further ado let’s get to this week’s roundup!

Read more...

Memory footprint of the JVM

The JVM can be a complex beast. Thankfully, much of that complexity is under the hood, and we as application developers and deployers often don’t have to worry about it too much. With the rise of container-based deployment strategies, one area of complexity that needs some attention is the JVM’s memory footprint.

Two kinds of memory

The JVM divides its memory into two main categories: heap memory and non-heap memory. Heap memory is the part with which people are typically the most familiar. It’s where objects that are created by the application are stored. They remain there until they are no longer referenced and are garbage collected. Typically, the amount of heap that an application is using will fluctuate as a function of the current load.

Read more...

A Bootiful Podcast: Matt Raible and James Ward at Devnexus 2019

Hi Spring fans! In this extra-long installment I talk with longtime friends and fellow developer advocates, Okta’s Matt Raible and Google’s James Ward. We talked about Java, Kotlin, Spring, cloud computing technologies, security, Go, paradigm changes, web frameworks past and present, Macromedia, Adobe, Scala, and a million more things! This was a ton of fun for me so I’m hoping you’ll enjoy it too.

Google Developer Advocate James Ward on Twitter (@_jamesward)
Okta Developer Advocate Matt Raible on Twitter (@mraible)

Read more...

Has there ever been a better time to become a Java developer?

Surely there’s never been a better time to become a Java developer?

There are productivity tools available these days that would have been mind-blowing just five years ago.

Take Spring Boot for example. Many people reading this on the Spring website may be familiar with Spring Boot. But let’s take a moment to acknowledge its awesomeness.

Years ago, if you were going to use the Spring Framework in your application, you had to be OK with a certain amount of configuration toil creeping into your day. But it wasn’t nice friendly configuration like, (ah, actually, sorry, I can’t think of an example of ‘friendly configuration’), it was nasty XML configuration with a side order of XSD, eww!

Read more...

Flight of the Flux 1 - Assembly vs Subscription

This blog post is the first in a series of posts that aim at providing a deeper look into Reactor’s more advanced concepts and inner workings.

It is derived from my Flight of the Flux talk, which content I found to be more adapted to a blog post format.

I’ll update the table below with links when the other posts are published, but here is the planned content:

  1. Assembly vs Subscription (this post)
  2. Debugging caveats
  3. Concurrent Agnostic
  4. Schedulers and publishOn vs subscribeOn
  5. Inner workings: work stealing
  6. Inner workings: operator fusion
Read more...

This Week in Spring - March 5th, 2019

Hi Spring fans! Welcome to another installment of This Week in Spring! I flew 14 hours to Tel Aviv, Israel. I then spent 28h on the ground visiting customers, visiting my friends at Codota, and then presenting at a packed house at the Israel Java User Group. Then I flew another 14 hours back to San Francisco, CA where I presented for a four-hour online course on using Kotlin with Spring Boot. Tonight I’ll fly to Atlanta, GA for the incredible DevNexus conference where I’ll be presenting (twice) with the good Dr. Venkat Subramaniam on Kotlin (and Spring) and more. Tomorrow, I’m doing a four hour course on testing. Join me!

Read more...

Spring Initializr: new UI

On behalf of the team and everyone who has contributed, I’m happy to announce that Spring Initializr has been updated and is now available on start.spring.io.

A short history of Spring Initializr

The project started out as a minimal HTML form, letting you generate a Spring Boot application with a few options. It’s been well received by the Spring community, so the team added new ways to interact with it, through the command-line or your favorite IDE.

After a while, we decided to work on a first revision of the UI. We simplified the form, leaving the essential parts front and center and pushing others in a section hidden by default. Given the number of dependencies, we created a search box to look for available starters.

Read more...

This Week in Spring - February 26, 2019

Hi Spring fans! What a week! This week I’m in San Francisco, CA; Columbus, OH (for the epic SpringOne Tour stop there), and then it’s off to Tel Aviv, Israel for customer visits and an appearance at the Israel JUG. If you’re around, then I’d love to connect!

Anyway, and as always, we’ve got tons to cover so let’s get to it!

Read more...