Latest in branch 4.3
4.3.30
Released 09 Dec 2020
(5 years ago)
SoftwareSpring Framework
Version4.3
Supported
Java versions
Java 6+
Initial release4.3.0
10 Jun 2016
(10 years ago)
Latest release4.3.30
09 Dec 2020
(5 years ago)
End of
OSS support
Dec 2020
(Ended 5 years ago)
End of
enterprise support
Unavailable
Source codehttps://github.com/spring-projects/spring-framework/tree/v4.3.30.RELEASE
Documentationhttps://docs.spring.io/spring-framework/docs/4.3.x/spring-framework-reference/html/new-in-4.3.html
Spring Framework 4.3 ReleasesView full list

What Is New in Spring Framework 4.3

Spring Framework 4.3 is a refinement release packed with enhancements that streamline development and reduce boilerplate code. It focuses on convention-over-configuration, especially for web and data access layers, and introduces better support for the latest Java and web standards. This version makes your daily coding tasks more efficient.

Category Key Updates
Core Container Implicit constructor injection for single-constructor classes, @Autowired optional on such constructors, improved @EventListener detection.
Web MVC & WebFlux Composed annotation support for @RequestMapping, new @GetMapping, @PostMapping etc. annotations, built-in support for HTTP PATCH method, improved @ResponseStatus on exceptions.
Testing New TestContext feature for executing SQL scripts, JUnit 5 support (preliminary), new @Commit annotation, relaxed rules for @Transactional test methods.
Data Access Spring Data query-by-example support, JpaRepository retrieval methods can return Java 8 Optional, @Transactional support for proxy modes and propagation types.
Miscellaneous Support for Java 8's java.time and java.util.Optional across the framework, improved log4j 2 support, Apache POI 3.17+ support.

How does Spring 4.3 reduce boilerplate in my controllers?

It introduces a set of composed @RequestMapping shortcut annotations. You no longer need to write @RequestMapping(method = RequestMethod.GET). Instead, you can use @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, and @PatchMapping directly on handler methods.

This makes controller code more readable and concise. In practice, it's a small change that significantly cleans up your web layer definitions.

// Old way
@RequestMapping(value = "/users/{id}", method = RequestMethod.GET)
public User getUser(@PathVariable Long id) { ... }

// New in 4.3
@GetMapping("/users/{id}")
public User getUser(@PathVariable Long id) { ... }

What are the improvements for dependency injection?

Spring 4.3 can perform implicit constructor injection for classes with a single constructor. If you have one constructor, the @Autowired annotation becomes optional. The framework will automatically wire dependencies through that constructor.

This matters because it promotes a cleaner, constructor-injection style without annotation noise. It encourages immutable components and simplifies configuration for typical service and repository beans.

// Before: @Autowired was required
@Service
public class MyService {
    private final MyRepository repo;
    @Autowired
    public MyService(MyRepository repo) {
        this.repo = repo;
    }
}

// With 4.3: @Autowired is optional
@Service
public class MyService {
    private final MyRepository repo;
    public MyService(MyRepository repo) { // Implicitly autowired
        this.repo = repo;
    }
}

What new testing features were added?

The TestContext framework now supports executing SQL scripts during the test lifecycle using the new @Sql annotation. You can also use @SqlConfig to define script execution behavior. A new @Commit annotation indicates that a transactional test method should commit the transaction instead of the default rollback.

These features give you finer control over test database state. The @Sql support is particularly useful for setting up complex data scenarios without embedding SQL in Java code or using external fixtures.

@RunWith(SpringRunner.class)
@ContextConfiguration
@Sql("/test-data.sql") // Script runs before test method
@Sql(scripts = "/cleanup.sql", executionPhase = AFTER_TEST_METHOD)
public class MyRepositoryTest {
    @Test
    @Commit // Transaction is committed
    public void testWithCommittedData() { ... }
}

How does Spring 4.3 handle modern Java types?

Framework support for Java 8's java.time (JSR-310) and java.util.Optional is now integrated across core Spring abstractions. For example, Spring Data repository methods can return Optional<T> instead of a nullable result. Controllers can also accept or return java.time types for seamless JSON/XML serialization.

This allows you to write more modern, null-safe code when interacting with Spring's data layer. It aligns the framework with idiomatic Java 8 patterns developers are already using.

// Spring Data JpaRepository
public interface UserRepository extends JpaRepository<User, Long> {
    Optional<User> findByEmailAddress(String email);
}

// In a controller
@GetMapping("/events/{date}")
public List<Event> getEventsOnDate(@PathVariable @DateTimeFormat(iso = ISO.DATE) LocalDate date) {
    return service.findByDate(date);
}

FAQ

Do I need to use Java 8 for Spring Framework 4.3?
No, Java 6, 7, and 8 are all supported. However, to use the new java.time and Optional support, you must be on Java 8. The framework itself is compiled with Java 8 but maintains runtime compatibility with earlier versions.

Are the new @GetMapping annotations just syntactic sugar?
Yes, but they are more than that. They are meta-annotated with @RequestMapping and the specific HTTP method. This makes them composable and usable in your own custom annotations, promoting a declarative style.

Is constructor injection without @Autowired safe with multiple constructors?
No. The implicit injection only works when there is exactly one constructor. If you have multiple constructors, you must still annotate the one you want Spring to use with @Autowired.

Can I use JUnit 5 with Spring 4.3?
Spring Framework 4.3 offers preliminary, basic support for JUnit 5 (via the junit-platform). However, full integration with the Spring TestContext Framework is a goal for a future release. For production tests, JUnit 4 is still the primary supported version.

What happened to the @Configuration bean definition "lite" mode?
It's still there and enhanced. In 4.3, @Bean methods on plain @Component classes (so-called "lite" mode) better support inter-bean references and even some dependency injection features, blurring the line between full @Configuration and component classes.

Releases In Branch 4.3

VersionRelease date
4.3.3009 Dec 2020
(5 years ago)
4.3.2915 Sep 2020
(5 years ago)
4.3.2821 Jul 2020
(5 years ago)
4.3.2728 Apr 2020
(6 years ago)
4.3.2614 Jan 2020
(6 years ago)
4.3.2502 Aug 2019
(6 years ago)
4.3.2409 May 2019
(7 years ago)
4.3.2331 Mar 2019
(7 years ago)
4.3.2209 Jan 2019
(7 years ago)
4.3.2127 Nov 2018
(7 years ago)
4.3.2015 Oct 2018
(7 years ago)
4.3.1907 Sep 2018
(7 years ago)
4.3.1813 Jun 2018
(8 years ago)
4.3.1708 May 2018
(8 years ago)
4.3.1609 Apr 2018
(8 years ago)
4.3.1503 Apr 2018
(8 years ago)
4.3.1423 Jan 2018
(8 years ago)
4.3.1327 Nov 2017
(8 years ago)
4.3.1210 Oct 2017
(8 years ago)
4.3.1111 Sep 2017
(8 years ago)
4.3.1020 Jul 2017
(8 years ago)
4.3.907 Jun 2017
(9 years ago)
4.3.818 Apr 2017
(9 years ago)
4.3.701 Mar 2017
(9 years ago)
4.3.625 Jan 2017
(9 years ago)
4.3.521 Dec 2016
(9 years ago)
4.3.407 Nov 2016
(9 years ago)
4.3.319 Sep 2016
(9 years ago)
4.3.228 Jul 2016
(9 years ago)
4.3.104 Jul 2016
(9 years ago)
4.3.010 Jun 2016
(10 years ago)
4.3.0.RC206 May 2016
(10 years ago)
4.3.0.RC106 Apr 2016
(10 years ago)