Deep Research Agents, RestClient Error Handling, and the Fundamentals That Still Matter

Happy Monday, friends! Last week was a packed week. I published three new videos, had some great conversations on Spring Office Hours, and spent a lot of time thinking about how AI is changing the way we build software (and what it isn't changing). Let's get into it.

Video Recaps

Getting Started with Error Handling in the RestClient

If you're using Spring's RestClient, you've probably noticed it throws exceptions on HTTP errors by default. That's fine for quick prototypes, but in production you need a real strategy for handling 4xx and 5xx responses gracefully.

In this video, I walk through the different approaches to error handling with the RestClient. We look at how to use status handlers to intercept error responses before they become exceptions, and how to build a clean, consistent pattern for dealing with failures across your application.

This is one of those topics that sounds simple but trips people up in practice. If you've ever wondered what the "right" way to handle errors with RestClient is, this one's for you:

Spring AI Deep Research Agent

I built a Deep Research Agent with Spring AI that can search the web, synthesize findings, and generate reports. This was a really fun one to put together.

The idea is straightforward: give an AI agent the ability to do real research by searching the web, reading through results, and pulling together a coherent summary. Think of it as automating the kind of deep dive you'd normally spend hours doing manually. The agent uses Spring AI's tool calling capabilities to orchestrate the whole workflow.

If you're interested in building agentic applications with Spring AI, this is a solid example of what's possible right now:

Lazy Constants

Java keeps getting better, and lazy constants are a great example of a small but meaningful improvement. This new API introduces objects that hold unmodifiable data but defer initialization until the value is actually needed.

If you've ever written your own lazy initialization pattern with volatile fields and double-checked locking, you know how easy it is to get wrong. Lazy constants give you a clean, built-in way to handle this. I walk through the API and show you how to use it in practice.

Spring Office Hours

Last week on Spring Office Hours, DaShaun and I had Billy Korando on to talk about JDK 26. There's a lot coming in this release and Billy gave us a great rundown of the features developers should be paying attention to. If you missed it, definitely go back and check that one out.

This week we had Daniel Garnier-Moiroux join us to talk about testing Spring Boot applications. Testing is one of those areas where everyone agrees it's important, but the practical "how" can get murky fast, especially with Spring's application context, slices, and mocking strategies. Daniel brought a ton of practical insight to the conversation:

Upcoming Speaking Engagements

I'm heading to Arc of AI in Austin, TX from April 13-16, and I'm giving two talks:

  • Building and Securing MCP Servers in Java: The Model Context Protocol is quickly becoming the standard for how AI applications connect to external systems. I'll cover the building blocks of MCP and show you how to build, secure, and test your MCP servers in Java.
  • Fundamentals of Software Engineering in the Age of AI: This one is close to my heart. Agentic coding assistants are changing workflows, but the fundamentals of software engineering aren't going anywhere. I'll make the case for why mastering the craft matters more than ever.

If you're going to be in Austin, come say hi!

In the News

Devolution Podcast

I joined my good friend Nicky Pike on his Devolution podcast for a conversation about the book and all things AI:

Nicky is one of those people who asks genuinely thoughtful questions, so this ended up being a really fun conversation. We talked about the book, where AI fits into a developer's daily workflow, and what I think the next couple of years look like for our industry. If you're a podcast listener, give this one a shot.

Tweets

I got some new toys last week and hopefully this leads to higher quality videos and podcasts!

Vibe Coding isn't a magic fix.

UNTIL NEXT WEEK

I hope you enjoyed this newsletter installment, and I will talk to you in the next one. If you have any questions for me or topics you would like me to cover please feel free to reply to this email or reach out to me on Twitter.

Happy Coding, Dan Vega https://www.danvega.dev