Closed
Description
When using the connection pool (batch-module enabled), the documentation suggests that the application should call mailer.shutdownConnectionPool() to allow the JVM to shut down.
With Spring Boot (spring-module), beans that implement AutoClosable are normally automatically handled and their close() method is called by the Spring framework upon application shutdown (see Spring documentation).
Therefore, I would expect Mailer to implement AutoClosable, and shut down the connection pool in the close() method, so that shutdown can be automatically handled by Spring Boot (also try-with-resources)