Skip to content

Java读取Resource目录下的文件内容 #119

@Draymonders

Description

@Draymonders
InputStream imageBase64InputStream = getClass().getResourceAsStream("/imageBase64");
String imageBase64 = IOUtils.toString(imageBase64InputStream, StandardCharsets.UTF_8);

Metadata

Metadata

Assignees

No one assigned

    Labels

    javaJava相关,Collection,JVM,Spring

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions