Issue
I use the com.vladmihalcea:hibernate-types-52
dependency in my Spring Boot Project. And, I notice that on application boot, some large log messages were added:
2020-04-09 11:43:59.535 WARN 3465 --- [ main] Hypersistence Optimizer : You should use Hypersistence Optimizer to speed up your Hibernate application!
2020-04-09 11:43:59.535 WARN 3465 --- [ main] Hypersistence Optimizer : For more details, go to https://vladmihalcea.com/hypersistence-optimizer/
2020-04-09 11:43:59.536 INFO 3465 --- [ main] Hypersistence Optimizer :
_ _ _ _
| | | | (_) | |
| |__| |_ _ _ __ ___ _ __ ___ _ ___| |_ ___ _ __ ___ ___
| __ | | | | '_ \ / _ \ '__/ __| / __| __/ _ \ '_ \ / __/ _ \
| | | | |_| | |_) | __/ | \__ \ \__ \ || __/ | | | (_| __/
|_| |_|\__, | .__/ \___|_| |___/_|___/\__\___|_| |_|\___\___|
__/ | |
|___/|_|
____ _ _ _
/ __ \ | | (_) (_)
| | | |_ __ | |_ _ _ __ ___ _ _______ _ __
| | | | '_ \| __| | '_ ` _ \| |_ / _ \ '__|
| |__| | |_) | |_| | | | | | | |/ / __/ |
\____/| .__/ \__|_|_| |_| |_|_/___\___|_|
| |
|_|
The hint is nice and the project sounds actually interesting, but still want to have the banner removed from my application.
Solution
There is a description by the Project Owner why the banner was introduced, why it will not be disabled on default and how to disable it manually.
How to remove the Hibernate Types banner
The automatic banner removal mode
In short, you can buy a Hypersistence Optimizer license and add the project as a dependency to benefit from the JPA and Hibernate auto-tuning checks.
Manual banner removal
Or you can add either a hibernate.properties
or hibernate-types.properties
file to your project with the one property to disable the banner:
hibernate.types.print.banner = false
Or, you could pass this property as a Java System property:
java -Dhibernate.types.print.banner=false -jar target/high-performance-java-persistence-1.0.0.jar
Spring Boot
Starting with the release of Hibernate 5.5 and the hibernate-types-55
dependency, you can now provide the hibernate.types.print.banner
property in your application.properties
file, like this:
spring.jpa.properties.hibernate.types.print.banner=false
If you're using
hibernate-types-52
or older dependencies, then you won't be able to provide this setting via the Spring Bootapplication.properties
file.
Answered By - Simulant