Access to a class in a classpath of a fat Spring Boot app from a nested library

24 Views Asked by At

I created an implementation for a class, referenced by system property java.util.logging.config.class in a project submodule. Java cannot find this class because bootJar packed it to BOOT-INF/lib:

Logging configuration class "com.evil.logging.JulBootstrap" failed
java.lang.ClassNotFoundException: Unable to load class com.evil.logging.JulBootstrap
getBootstrapResource not available on ClassLoader

I've read about possibility to unpack certain libs to a temporary directory with requiresUnpack:

tasks.named("bootJar") {
    requiresUnpack '**/jruby-complete-*.jar'
}

I think it is too late for JUL logging to unpack jar by a framework. Is there a way to extract a class from a library to a fat jar root classpath?

0

There are 0 best solutions below