Classpath resources inside one-jar packaged via sbt

前端 未结 3 2058
我在风中等你
我在风中等你 2021-01-19 06:27

I have a project that is build using SBT which packages a single jar using the one-jar plugin. That project contains a bunch of json files in src/main/resources/fixture whic

3条回答
  •  花落未央
    2021-01-19 06:36

    I think one-jar uses a special classloading mechanism?

    Yes, this must be true since there is no standardized way to load classes that packaged into dependency jar that is in turn packaged into your application jar. This usually is implemented with additional classloader trickery.

    Loading resources when using One-JAR is documented here.

提交回复
热议问题