Draymonders / Code-Life

The marathon continues though.
27 stars 3 forks source link

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

Open Draymonders opened 3 years ago

Draymonders commented 3 years ago
InputStream imageBase64InputStream = getClass().getResourceAsStream("/imageBase64");
String imageBase64 = IOUtils.toString(imageBase64InputStream, StandardCharsets.UTF_8);