I have a spring boot application that is taking over 5 minutes to start. One of the embedded jar files is a Java Cryptography Provider, which is required to do self-integrity check. For each class in the provider's jar, I see the following in the log:
[JarVerifier] providerpackage/.../ClassName.class is signed as expected
When used as part of the spring-boot jar application and using one of the Spring Boot's launcher classes, this self-integrity check takes about 5 minutes. However, when running the same application as exploded and specifying my own main class it only takes few seconds. The difference is Spring Boot launcher classes use Spring Boot's custom class loader. Is there any way to package the application as a standard Spring Boot application without the slow startup time?
I have already tried to use the provider's jar file as an external jar using -cp
and -Dloader.path
but the same issue exists.