Spring I/O 2024
I just returned from my very first Spring I/O and I thought this would be a great opportunity to tell you about one of the best conferences I have eve been to. I am very fortunate to be able to travel the world visiting customers and conferences but this was by far one of my favorite trips ever.
Usually when I visit conferences there is a dedicated track for Java and or Spring so one of the first things I do is try and find my people. I look for the Java / Spring developers and I hang out with them because I love to listen to what they are working on or what they are interested in.
This time I didn't have to find my people, they were EVERYWHERE! It was really exciting to hear everyone talking about all the cool things they are doing with Java & Spring and I felt right at home.
The other thing that was really exciting for me is the amount of love I felt from all of you. I had so many people come up to me and tell me how much they appreciate all the content I get to work on. The major theme was that all the videos that I work on are really helping people learn Java and Spring. I knew this already from all the amazing comments I get online and I appreciate them, but it's totally different hearing that from people in person. To know that I am helping people get that first job, promotion or just leveling up from real people was something I will never forget. In fact, it has rejuvenated me to know that what I am doing is making a real difference and I need to do more of it.
Spring I/O Morning Session and Keynote
The conference kicked off early Thursday morning for me with the opening sessions and keynote. The opening session was a welcome to everyone to the conference, and it started with an amazing drone show. Next the conference organizer Sergi (alongside Sanderson Jones who was amazing by the way ) kicked off the conference by welcoming everyone with some amazing stats about who was in attendance. It was really great to see so many Spring developers represented by so many countries across the world.
After that they got a big round of applause for all the speakers and sponsors of the conference. This was my opportunity to tell everyone about the amazing things we are doing at Tanzu, the division I work for inside of Broadcom. I had a 2-minute script that I wrote and rehearsed. I was a little a nervous because scripting something and remembering it was not something I have done a lot of especially in front of 2,000 people. In the end I thought I did a good job of representing Spring and Tanzu, so I hope you enjoyed it.
Keynote
Next up was the keynote, and it was kicked off by none other than Juergan Holler who took the opportunity to share some of the results form the State of Spring Survey we held this year. It was really great to hear that a majority of developers were running Java 17+ and Spring Boot 3.0+ in production. He even made a comment that I really enjoyed that Java 17 was the new Java 8. This means that as a community we are running newer versions of Java and this makes me happy. He also made it a point that the Spring team spent a lot of time this year going through the backlogs and fixing and closing a lot of issues.
We also had a chance ot hear from so many presenters on all the new features in Spring and some of the different projects in the ecosystem. First up was Sebastien Deluze to talk about all the exciting features around the theme of runtime efficiency. We had a chance to hear about all the exciting things we can do to improve performance and even got a sneak peek at some things coming in Spring Boot 3.4.
Next up we got a demo from Stéphane Nicoll / Brian Clozel. I absolutely love when these 2 present on anything because they have such a great chemistry and flow to their presentations. They do a great job of live coding and walking through everything they are doing.
Next Cora, my coworker gave us an introduction to Spring Modulith and why we should take a look at this project for our next application. I thought she did an amazing job of laying out the problems with current architectures and what Spring Modulith will solve. I was also excited to hear about a new feature that supports migrating legacy applications incrementally to Spring Modulith which I think is going to be a game changer.
Finally, we had a really great presentation by Christian Tzolov and Josh Long on Spring AI. They took the infamous Pet Clinic application and turned it into a pet agency, a way to adopt your next pet. I thought they did an amazing job of showing off the new features in Spring AI while keeping it interesting. Josh did his live coding thing while telling an amazing story about his dog.
If you want to watch the replay of the keynote you can do so below. I am interested in hearing what you thought of the keynote and what presentations / announcements you found exciting.
Speaker Dinner
I left on Tuesday around 2:50 EDT and after a long delay in Washington and a trip through customs I finally arrived at my hotel on Wednesday around 4 PM. This left me 2 hours to rehearse my presentation at the welcome session and my session that would take place right after lunch on Thursday. We met right outside the hotel and jumped on a bus that would take us to the venue for the speaker dinner.
The speaker dinner was amazing with drinks, great food and friendly faces. I got to meet so many people that I have talked to online for years and this was the first time I got to meet them in person. I also got to meet so many coworkers for the first time and that was special. I ended up leaving after a couple of hours because I was exhausted from the jet lag and I needed to be up early the next morning.
A Spring Developers Guide to Navigating the Frontend Landscape
My only session of the conference was a tour of how to build a frontend for Spring Developers. The premise behind this talk was you are a Spring Developer and you need to build a frontend for you application, how do you go about doing so.
I only had 50 minutes, so I wanted to share some of the options you have for making this happen. I covered my passion for building for the web, how to do this in Java and some of your options for doing this in JavaScript.
The idea here is that the landscape of frontend development changes often and I wanted to leave you with some modern options for building frontend applications. We took a look at options in for building a frontend in Java like Spring MVC and Vaadin.
Next we took at look at the every changing landscape in the world of JavaScript. This includes package managers, build tools and runtimes. We also took some time to talk about JavaScript Frameworks and looked at examples of how to create a single project that includes both the frontend and backend. We wrapped up the frontend by introducing HTMX and showing off some code and how htmx lets you add dynamic behavior to your application WITHOUT writing JavaScript.
Finally, we discussed some of the things you should be thinking of to pick the right tool for the right job. I think it went really well and I got some really nice feedback. Thank you to everyone who showed up in person, I really appreciate it. If you want to grab the code for all the demos I walked through you can find it here.
Spring Office Hours Live
When DaShaun and I are both in the same place it’s always nice to try and schedule a live version of Spring Office Hours. We have done it in the past, but it isn't always easy because we don't have the equipment to travel with to produce a high quality show. This time we were able to get a really nice camera with a 35mm lens and 2 great microphones from the conference. It was a lot of fun having a live audience with us as we took the opportunity to talk about all the things happening at Spring I/O.
If you’re interested in hearing our wrap up of the conference and a deeper dive into the State of Spring Survey Results you can check out S3E21 below.
Sessions
I was able to attend a bunch of sessions and this was one of the best lineups of speakers and sessions I have ever seen. Normally I can pick out a few sessions that I want to attend but this was packed full of sessions that I could not miss. While I attended and enjoyed a bunch of sessions these are a few of them and the highlights that I want to share with you. When these sessions are published to YouTube I will return to this blog post and add the recordings but until then you will just have to take my word that they were all amazing 🤩
Spring Security Architecture Principles
One of the first sessions I attended was "Spring Security Architecture Principles" by Daniel Garnier-Moiroux. I have been working with Daniel for 2.5 years now, and it was really great to finally meet him and see him speak in person. Daniel is an amazing presenter and does a great job of mixing slides along with his live coding skills. In this talk Daniel took us back to the basics and explained some of the underlying fundamentals of Spring Security.
Security is hard, and it is used to cover so many different scenarios and I think our default is how do we do "x" in Spring Security which leads to Google/ChatGPT/StackOverflow. This can be confusing if you don't understand the base concepts like filters, authentication and authorization. One of the tips that Daniel shared with the audience was how to find out where in the security chain things are failing. He shared this with me personally awhile back, and it is my go to "cheat code". If you turn on TRACE
logging for Spring Security its easy to find out where in the filter chain things are failing.
logging.level.org.springframework.security=TRACE
logging:
level:
org:
springframework:
security: TRACE
I also learned that a presentation is not a presentation without Emoji's 🤣
Going AOT: Everything you need to know about GraalVM for Java applications
Next up was a session on GraalVM by Alina Yurenko who is a developer advocate for Oracle Labs. I have had the opportunity to meet Alina on Zoom a few times, but it was really great to finally meet her in person. She did a really great job of explaining some of the history of GraalVM, what it is and where its heading. I thought her slides were amazing and I learned a few things I didn't know going on.
First off you can use the GraalVM JDK for JIT compilation and possibly see some performance improvements. I'll have to wait for the recording to see what those improvements were because I was locked in this conference and wasn't taking notes. She also spoke about some work that they are doing behind the scenes to improve build times. Imagine the framework and all the third-party libraries were cached after the first build and all that you had to worry about what was your own code. This could make a huge difference on build times for native images, and I'm here for it! I also learned that you can install early access builds of GraalVM JDK right from sdkman
sdk install java 23.ea.9-graal
Introducing Spring AI
Last session of day 1 was an Introduction to Spring AI with Christian Tzolov & Mark Pollack. If you follow me you know I'm a big fan of Spring AI, so I was really interested in hearing about all the new features that dropped in 1.0.0 M1. I think the biggest new feature was the new chat client's fluent API design. If you have used something like the Web Client or Rest Client this will look pretty familiar. This cuts down on some code and makes it much more readable.
@RestController
public class ChatController {
private final ChatClient chatClient;
public ChatController(ChatClient.Builder builder) {
this.chatClient = builder
.defaultSystem("All of your answers should be in the voice of a pirate.")
.build();
}
@GetMapping("")
public String home(@RequestParam(value = "message", defaultValue = "Tell me a dad joke about Star Wars") String message) {
return chatClient.prompt()
.user(message)
.call()
.content();
}
}
Another big feature was the addition of advisors. You can use advisors when you need to append or augment the prompt with contextual data. This could be in the form of prompt stuffing or RAG when you need to add context to the conversation.
ChatResponse response = ChatClient.builder(chatModel)
.build().prompt()
.advisors(new QuestionAnswerAdvisor(vectorStore, SearchRequest.defaults()))
.user(userText)
.call()
.chatResponse();
You have to remember that these LLMs are all stateless APIs. We forget this because we use a tool like ChatGPT, and it remembers our previous conversation. This is a feature of ChatGPT, not the LLM. Spring AI adds the ability to have Chat Memory. This is another reason to use advisors and this makes it easy to take advantage of the new chat memory feature.
public ChatController(ChatClient.Builder builder) {
this.chatClient = builder
.defaultAdvisors(new MessageChatMemoryAdvisor(new InMemoryChatMemory()))
.build();
}
GraphQL Java & Spring: The latest features
I made sure I was up early on day 2 to get some breakfast and be the first one in the room to hear Rossen Stoyanchev talk about the latest features in Spring for GraphQL. He started off by showing a schema that included an Activity interface that was implemented by Run, Swim and Rowing. There are a lot of new features around this setup including a reworked inspection report that can now correctly report unmapped fields. Another feature I didn't realize was there is the GraphQL support in IntelliJ IDEA. If you look in the gutter for a query you can jump to the data fetcher for the query and vice versa. A small win but a pretty cool one if you ask me.
type Query {
athlete(id: ID) : Athlete
search(text: String): [SearchItem!]!
}
interface Activity {
id: ID!
description: String!
comments: [Comment!]
}
type Run implements Activity {
id: ID!
description: String!
comments: [Comment!]
elevation: Int # In meters.
}
Another big feature is federation and this has been something on my radar for a while now. I haven't had a chance to go through this repository yet but if you want to see how it works you can check it out here. The idea is that we would have a single gateway entry for our entire GraphQL API and then fan out to different services for each part of the API. This would allow each team to be responsible for their own piece of the API. Netflix does this really well and at the scale only Netflix can. I'm really excited to take a look at this and put together a tutorial.
Rossen also pointed out the integration with the DGS Framework from Netflix. This made a lot of sense for both sides, and it's exciting to see this collaboration going forward. If you want to read more about this you can check it out here.
Java meets TypeScript: Full-Stack Web Development with Spring Boot
I got a chance to sit in on Marcus Hellberg's session on Hilla. I'm a big fan of Marcus and Vaadin the company behind this project. This project gives you a really nice streamlined way to build full-stack Spring applications with Spring Boot + React. What's great about this is you can expose some endpoints on the Spring side and then get type safety on the frontend with TypeScript types generated for you. Another awesome result of this is I can almost seamlessly call my Java class from TypeScript.
function CustomerList() {
// Customer type is automatically generated by Hilla
const [customers, setCustomers] = useState<Customer[]>([]);
useEffect(() => {
CustomerService.getCustomers().then(setCustomers);
}, []);
return (
<ComboBox items={customers} />
)
}
I really enjoyed this presentation and I have seen enough to know that I want to put together a demo for Hilla.
Conclusion
I know it's not easy to get to conferences with budgets these days but if you have to pick 1 or 2 out of the year to go to this has to be on your list. Not only is Barcelona one of the most beautiful cities I have ever been to but this conference has to be on your bucket list. The speakers are top-notch, the sessions are amazing and Sergi does an amazing job at putting on one of the best conferences I have ever been to. At the end of the conference they announced the dates for next year's conference and I hope I will be there and I hope to see you all of there as well.