1

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.

fdelafuente
  • 1,114
  • 1
  • 13
  • 24
a2z
  • 11
  • 1
  • This may be the reason: https://stackoverflow.com/questions/137212/how-to-solve-slow-java-securerandom – humbaba Jul 11 '19 at 16:42
  • Unfortunately that is not the reason. The same issue happens in Windows too – a2z Jul 11 '19 at 18:25

0 Answers0