【问题标题】:How to load any file present under the conf or resources directory in Spring如何在 Spring 中加载 conf 或 resources 目录下的任何文件
【发布时间】:2012-01-17 17:36:02
【问题描述】:

我在问一个非常幼稚和新手的问题。

谁能告诉我使用 Spring 将 src/conf 或 src/resources 目录下的文件加载到我的 Java 类中的正确方法。

【问题讨论】:

标签: java spring


【解决方案1】:

弹簧方式是使用ResourceLoader

@见Spring Reference - Chapter 4.4 The ResourceLoader

【讨论】:

    猜你喜欢
    • 2016-08-28
    • 2013-04-24
    • 2019-10-16
    • 1970-01-01
    • 2020-02-06
    • 2016-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多