📜  spring boot 将文件保存到静态文件夹 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:05.264000             🧑  作者: Mango

代码示例1
String fileLocation = new File("src\\main\\resources\\static\\uploads").getAbsolutePath() + "\\" + fileName;

        FileOutputStream output = new FileOutputStream(fileLocation);

        output.write(imagem.getBytes());

        output.close();