In parts 2 and 3, we developed our sample application and interacted with it via the shell and HTTP. We used Embabel version 1.0 there, which targets Spring Boot 3.x / Spring AI 1.x.
Recently, the Embabel team released version 1.5, which supports Spring Boot 4.x / Spring AI 2.x. In this article, we'll explain how to migrate our sample application to the Embabel 1.5.x version. You can find the final version of the application in my GitHub repository.
The migration for my use case is really simple. First, in pom.xml we need to declare this Embabel version:
<properties>
<java.version>25</java.version>
<embabel-agent.version>1.5.1</embabel-agent.version>
</properties>
Please note that we use version 1.5.1 here. With version 1.5.0, I ran into a specific problem while using the Amazon Bedrock Converse API. This was due to the fact that BedrockOptionsConverter created generic ToolCallingChatOptions. Spring AI 2.0’s BedrockProxyChatModel expects BedrockChatOptions and casts the request options accordingly, causing:
ClassCastException: DefaultToolCallingChatOptions cannot be cast to BedrockChatOptions.
With version 1.5.1, the Embabel team fixed the problem. Next, as Spring Boot 4.x / Spring AI 2.x uses Jackson version 3 by default, we need to declare a Jackson 3 mapper Spring bean. We do it in the Spring Boot main EmbabelConferenceApplication application class of our sample application:
@Bean
public JsonMapper objectMapper() {
return new tools.jackson.databind.json.JsonMapper();
}
That's it. Now you can compile, start, and interact with our sample application the same way we described in parts 2 and 3.