Spring Boot sporadically fails to find classpath resource

40 Views Asked by At

When starting from the IDE, it works. Starting the fat jar from command line also used to work, but since recently I get the following error:

Reason: failed to convert java.lang.String to java.io.File (caused by java.lang.IllegalStateException: Could not retrieve file for class path resource [api-jwt-dev_keystore.p12]: class path resource [api-jwt-dev_keystore.p12] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/app/bin/myapp-service-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/api-jwt-dev_keystore.p12)

this is my application.yml:

app:
  zone-id: "UTC"
    jwt:
      sign-key-store-file: classpath:api-jwt-dev_keystore.p12

I extracted the fat-jar and the file seems to be there.

0

There are 0 best solutions below