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.
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
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.
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
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.
An alternative to the answers above, if you do not have access to JVM arguments.
Both these approaches work with Spring Boot, tested on 2.2.x.
Create a file at src/main/resources/hibernate-types.properties
.
hibernate.types.print.banner=false
Create either of the following files (depending on your version of hibernate-types
).
Latest way of doing things: src/main/java/io/hypersistence/optimizer/core/License.java
.
package io.hypersistence.optimizer.core;
public class License {
public static class Signature {
}
}
An older version checks for src/main/java/io/hypersistence/optimizer/HypersistenceOptimizer.java
.
package io.hypersistence.optimizer;
public class HypersistenceOptimizer {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With