News

IntelliJ IDEA 2025.3 đź’š Spring 7

Major Spring Framework releases don’t come around often – and when they do, they tend to reshape how we build applications for years to come. Spring Framework 7 is one of those releases. It simplifies many aspects of development, cleans up some long-standing pain points, and introduces features that previously required custom annotations or boilerplate-heavy workarounds.

The IntelliJ IDEA team has been keeping pace since the early milestones, working closely with the Spring Framework team to ensure smooth integration and reliable tooling support. We truly appreciate their collaboration, insights, and early feedback – this release wouldn’t have been possible without their help and expertise. If you’re already experimenting with Spring 7, you’ll be happy to know that IntelliJ IDEA 2025.3 is ready for it out of the box.

Let’s explore the most prominent features of Spring 7 and see how IntelliJ IDEA 2025.3 helps you make the most of it.

REST API Versioning

If you’ve ever had to version an API manually, you know the pain: URL gymnastics, header verification, parsing and comparing SemVer strings, etc. Spring 7 finally introduces a built-in, first-class versioning mechanism. You can now define versions right in your mapping annotations:

@GetMapping(path = "/quote", version = "1.0+")

ResponseEntity<Quote> getQuote() {

        Quote result = quoteService.getRandomQuote();

        return ResponseEntity.ok(result);

    }

IntelliJ IDEA detects this automatically. The IDE checks whether versioning is configured in your app, identifies whether you’re using a property or the ApiVersionConfigurer class, and even warns you if something’s off. If you forgot to enable versioning, the IDE doesn’t just underline the issue – it tells you how to fix it.

By default, IntelliJ IDEA suggests using property-based configuration that enables versioning through a header attribute. It’s a safe starting point, and you can tweak it later if you’re doing something fancy.

spring.mvc.apiversion.use.header=Api-Version

And yes, you can Ctrl+Click on the version in the @GetMapping annotation to jump straight to your configuration code. The IDE also checks that your version values follow standard SemVer rules. 

If you’re using a custom version parser, IntelliJ IDEA won’t interfere.

Testing versioned APIs

When it comes to testing, you can do it in a straightforward way and keep things simple. 

mockMvc.perform(get("/api/quote")

                        .accept(MediaType.APPLICATION_JSON)

                        .header("API-Version", "1.0")

                )

On the other hand, Spring 7 lets you configure API versioning for tests and provides a new API – apiVersion method:

IntelliJ IDEA knows about this API and will help you to configure versioning for tests. For the header-based versioning, the code will look like this:

@TestConfiguration

static class QuoteControllerTestConfig implements MockMvcBuilderCustomizer {

        @Override

        public void customize(ConfigurableMockMvcBuilder<?> builder) {

            builder.apiVersionInserter(ApiVersionInserter.useHeader("Api-Version"));

        }

    }

This configuration lets you define your versioning approach in a single class, which greatly simplifies test maintenance.

HTTP Interface Clients

Declarative HTTP clients have been part of Spring since version 6, but they used to require quite a bit of boilerplate code. Spring 7 makes it much simpler: one interface, one annotation, done. Versions are supported as well.

Example:

@HttpExchange(url = "http://quotes.server.com:8080/api/")

interface QuoteClient {

    @GetExchange(url = "/quote", version = "1.0")

    Quote fetchRandomQuote();

}

In Spring 7, registration is very straightforward. Just add the following annotation to a @Configuration class:

@ImportHttpServices(types = QuoteClient.class)

As of now, to support versioning in the HTTP Interface client, you still need to write configuration manually. We’ll improve it in the nearest IntelliJ IDEA updates.

spring.http.serviceclient.default.apiversion.default-version=1.0.0

spring.http.serviceclient.default.apiversion.insert.header=API-Version

IntelliJ IDEA 2025.3 recognizes HTTP interfaces as beans – no more “red squiggly lines” or “cannot resolve bean” warnings. You get full autocompletion, navigation, and injection support wherever these clients are used.

You can also see where each client is referenced – right from the gutter icons or in the Structure tool window. It’s a small thing, but it saves time when you’re tracing through yet another microservice.

Looking ahead, we are working on inspections that will detect unregistered clients or incorrect imports, and even help generate clients from OpenAPI specs. In short, let developers spend less time wiring HTTP clients, and more time improving the API they call.

Dynamic Bean Registration

Here’s something new: the BeanRegistrar interface. Sometimes you need to register beans dynamically, and @Conditional annotations just don’t cut it. Spring 7 now lets you do this cleanly:

public class QuoteProviderRegistrar implements BeanRegistrar {

    @Override

    public void register(BeanRegistry registry, Environment env) {

        registry.registerBean("quoteProviderDb", QuoteProviderDb.class);

        registry.registerBean("quoteProviderFallback", QuoteProviderFallback.class);

    }

}

If your bean construction logic gets complex or depends on multiple factors, programmatic bean registration is a neat way to handle it. IntelliJ IDEA recognizes these beans dynamically, so you won’t see those annoying “unresolved injection” warnings anymore. You can navigate straight from the injection point right to the registrar – those familiar little green bean icons in the gutter have got you covered.

Of course, the IDE can’t anticipate every edge case of dynamic registration – that’s where the Spring Debugger comes in. When you’re debugging a complex setup, it shows you exactly what’s injected at runtime. 

Conclusion

Spring 7 is packed with new features – from built-in resilience support and updated Jackson integration to Spring Data AOT repositories, just to name a few. 

The IntelliJ IDEA team works hard to ensure everything runs seamlessly in your projects, so that you can stay productive and take advantage of the latest technologies. As Spring 7 adoption grows, we will continue adding features that help you focus on your code, not the framework.

image description