shadow icon indicating copy to clipboard operation
shadow copied to clipboard

Spring Boot application.properties is not working when building using shadowJar

Open skywalker123p opened this issue 1 year ago • 0 comments

Please check the User Guide before submitting "how do I do 'x'?" questions!

Shadow Version

7.1.2

Gradle Version

7.6

Expected Behavior

Building Spring Boot Executable Jar using shadowJar: application.properties should be used when running java -jar abcShadowJar.jar

Actual Behavior

application.properties is not recognized by Spring Boot application because its in root directory when building using shadowJar.

Gradle Build Script(s)

shadowJar {
    mergeServiceFiles()
    zip64 true
   archiveClassifier.set('standalone')
}

Content of Shadow JAR (jar tf <jar file> - post link to GIST if too long)

Simple Spring Boot web application

skywalker123p avatar Jul 01 '23 13:07 skywalker123p