Pivotal Releases Versions 1.3.8 and 1.4.1 of Spring Boot
New features in version 1.4 include:
- Startup failure messages
- Convention based error messages
- Extended data support
- Banner images
Startup Failure Messages
FailureAnalyzer interface intercepts exceptions and converts them to human-readable diagnostic messages. For example, the following error message will be displayed when a Spring Boot application tries to use a port already in use:
New for version 1.4.1 is a
NoSuchBeanDefinitionException instance of
FailureAnalyzer that intercepts an exception of a Spring bean not found:
Developers can also implement their own instances of the
Convention Based Error Messages
Custom HTML error messages can be written to intercept HTTP status codes for display on a website. For example,
404.html (rendered page shown below) placed in
/src/main/resources/public/error will handle an HTTP 404 status code.
By default, all Spring applications display an ASCII art Spring logo on startup. Spring Boot now allows for custom startup banners by converting any image in
*.png to ASCII art. The filename must start with
banner.* and be placed in the folder,
/src/main/resources. For example, as shown below, the standard Java logo was auto-generated to ASCII art.
An example Spring Boot application can be found on GitHub.
The Spring Boot team plans a version 1.5 release by the end of 2016 that will include pull requests that couldn’t be completed before version 1.4. Spring Boot 2.0 is planned to be fully integrated with Spring Framework 5 and will require Java 8.
More Spring Boot examples can be found at Spring’s GitHub repository.