Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreOne behalf of the Spring Boot team, and everyone that has contributed, I am pleased to announce that Spring Boot 1.4.0 has been released and is available now from repo.spring.io, Maven Central and Bintray. This release adds a significant number of new features and improvements and builds on the latest release of the Spring Framework. For full upgrade instructions and "new and noteworthy" features please see the release notes.
Here are some of the highlights of v1.4:
Spring Boot will now perform analysis of common startup failures and provide useful diagnostic information rather than simply logging a stack trace. For example, if you have a port clash, you'll now see the following message:
*************************** APPLICATION FAILED TO START *************************** Description: Embedded servlet container failed to start. Port 8080 was already in use. Action: Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
Custom error pages for a given status code can now be created by following a convention based approach. Simply add static HTML or a template in the correct location to create a mapping. For example, to register a custom 404 page you could add src/main/resource/public/error/404.html
Spring Boot now ships with support for Neo4J, Couchbase and Redis Spring Data repositories. In addition, Hibernate 5.0 is now the default JPA provider. We've also refreshed our Elasticsearch integration to support the Jest client.
You can now use image files to render ASCII art banners. Drop a banner.gif
, banner.jpg
or banner.png
file into src/main/resources
to have it automatically converted into ASCII:
Spring Boot 1.4 includes a major overhaul of testing support. Test classes and utilities are now provided in dedicated spring-boot-test
and spring-boot-test-autoconfigure
jars. We’ve added AssertJ, JSONassert and JsonPath dependencies to the test starter and provided a simpler unified @SpringBootTest
annotation for use with Spring's JUnit runner.
We can now also auto-configure many tests, meaning most users will require less test configuration. We've also introduced dedicated @JsonTest
, @WebMvcTest
, @RestClientTest
and @DataJpaTest
annotations that let you quickly test a "slice" of your application.
Finally, there's also comprehensive Mockto integration. You can now easily 'mock' or 'spy' Spring Beans:
@RunWith(SpringRunner.class)
@SpringBootTest
public class MyTest {
@MockBean
private RemoteService remoteService;
@Autowired
private Reverser reverser;
@Test
public void exampleTest() {
// RemoteService has been injected into the reverser bean
given(this.remoteService.someCall()).willReturn("mock");
String reverse = reverser.reverseSomeCall();
assertThat(reverse).isEqualTo("kcom");
}
}
The actuator /info
endpoint has been improved so that you can easily contribute additional items. Out of the box we now support:
info.*
)The /metrics
endpoint has also been refined so that submissions can be "merged" and/or "grouped".
There's a whole host of other changes and improvements that are documented in the Release Notes. You can also find a list of deprecated classes and methods that we plan to remove in the next version.
We want to take this opportunity to again thank all our users and contributors. We've now had over 281 people submit code, and there have been over 8,500 commits to the project.
If you're interested in helping out, check out the "ideal for contribution" tag in the issue repository. If you have general questions, please ask at stackoverflow.com using the spring-boot
tag.
Happy coding!