Spring: Inject URL for classpath resource

后端 未结 4 659
野性不改
野性不改 2021-01-11 09:53

I want to inject the URL of a classpath resource in a way that does not create a dependency on Spring in the Bean. Meaning, the bean should not use Spring\'s interfaces/clas

4条回答
  •  失恋的感觉
    2021-01-11 10:33

    There is hardly anything non-spring that's equivalent to Spring's resource concept.

    You could for example use Guava's InputSupplier as an alternative, but you are missing powerful standard spring features if you do.

提交回复
热议问题