自动化立体仓库 - WMS系统
zyx
2023-11-02 8808ebb9bb3eb8e6bc9ed8bfc6cfaf53e63d6614
src/main/java/com/zy/system/controller/LicenseCreatorController.java
@@ -87,8 +87,11 @@
    @RequestMapping(value = "/updateLicense")
    public R updateLicense(@RequestParam("file") MultipartFile[] files){
        MultipartFile file = files[0];
        String licensePathFileName = this.getClass().getClassLoader().getResource(licensePath).getPath();
        File licensePathFile = new File(licensePathFileName);
        //服务器端保存的文件对象
        File serverFile = new File(licensePath);
        File serverFile = new File(licensePathFile.getPath());
        if (serverFile.exists()) {
            try {
                serverFile.delete();//存在文件,删除