【问题标题】:How to Access folder in spring boot application如何在 Spring Boot 应用程序中访问文件夹
【发布时间】:2021-03-19 18:01:15
【问题描述】:

directory structure image

我想从java main函数访问反编译文件夹下的CFRDecompiler文件夹,我该怎么做

【问题讨论】:

    标签: java spring-boot decompiling inria-spoon


    【解决方案1】:

    可以试试这个代码 文件file = ResourceUtils.getFile("classpath:decompiled/CFRDecompiler/")

    【讨论】:

    • 这不起作用线程“main”java.io.FileNotFoundException中的异常:类路径资源[反编译/CFRDecompiler/]无法解析为绝对文件路径,因为它不存在
    • 你好,这是访问本地文件代码的正确方法,再试一次这个“classpath:decompiled/CFRDecompiler/samplefile.json”
    猜你喜欢
    • 2016-07-15
    • 2016-11-17
    • 1970-01-01
    • 2020-06-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-04
    • 2018-05-28
    相关资源
    最近更新 更多