| | |
| | | |
| | | try { |
| | | // 执行文件迁移(使用原子操作确保安全性) |
| | | Files.move( |
| | | Paths.get(tempFile.getTempPath()), |
| | | formalFilePath, |
| | | StandardCopyOption.REPLACE_EXISTING, |
| | | StandardCopyOption.ATOMIC_MOVE |
| | | ); |
| | | // Files.move( |
| | | // Paths.get(tempFile.getTempPath()), |
| | | // formalFilePath, |
| | | // StandardCopyOption.REPLACE_EXISTING, |
| | | // StandardCopyOption.ATOMIC_MOVE |
| | | // ); |
| | | // 原子移动失败,使用复制+删除 |
| | | Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.deleteIfExists(Paths.get(tempFile.getTempPath())); |
| | | log.info("文件迁移成功: {} -> {}", tempFile.getTempPath(), formalFilePath); |
| | | |
| | | // 更新文件记录(关联到业务ID) |
| | |
| | | |
| | | try { |
| | | // 执行文件迁移(使用原子操作确保安全性) |
| | | Files.move( |
| | | Paths.get(tempFile.getTempPath()), |
| | | formalFilePath, |
| | | StandardCopyOption.REPLACE_EXISTING, |
| | | StandardCopyOption.ATOMIC_MOVE |
| | | ); |
| | | // Files.move( |
| | | // Paths.get(tempFile.getTempPath()), |
| | | // formalFilePath, |
| | | // StandardCopyOption.REPLACE_EXISTING, |
| | | // StandardCopyOption.ATOMIC_MOVE |
| | | // ); |
| | | // 原子移动失败,使用复制+删除 |
| | | Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.deleteIfExists(Paths.get(tempFile.getTempPath())); |
| | | log.info("文件迁移成功: {} -> {}", tempFile.getTempPath(), formalFilePath); |
| | | |
| | | // 更新文件记录(关联到业务ID) |
| | |
| | | |
| | | try { |
| | | // 执行文件迁移(使用原子操作确保安全性) |
| | | Files.move( |
| | | Paths.get(tempFile.getTempPath()), |
| | | formalFilePath, |
| | | StandardCopyOption.REPLACE_EXISTING, |
| | | StandardCopyOption.ATOMIC_MOVE |
| | | ); |
| | | // Files.move( |
| | | // Paths.get(tempFile.getTempPath()), |
| | | // formalFilePath, |
| | | // StandardCopyOption.REPLACE_EXISTING, |
| | | // StandardCopyOption.ATOMIC_MOVE |
| | | // ); |
| | | // 原子移动失败,使用复制+删除 |
| | | Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.deleteIfExists(Paths.get(tempFile.getTempPath())); |
| | | log.info("文件迁移成功: {} -> {}", tempFile.getTempPath(), formalFilePath); |
| | | |
| | | // 更新文件记录(关联到业务ID) |
| | |
| | | |
| | | try { |
| | | // 执行文件迁移(使用原子操作确保安全性) |
| | | Files.move( |
| | | Paths.get(tempFile.getTempPath()), |
| | | formalFilePath, |
| | | StandardCopyOption.REPLACE_EXISTING, |
| | | StandardCopyOption.ATOMIC_MOVE |
| | | ); |
| | | // Files.move( |
| | | // Paths.get(tempFile.getTempPath()), |
| | | // formalFilePath, |
| | | // StandardCopyOption.REPLACE_EXISTING, |
| | | // StandardCopyOption.ATOMIC_MOVE |
| | | // ); |
| | | // 原子移动失败,使用复制+删除 |
| | | Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.deleteIfExists(Paths.get(tempFile.getTempPath())); |
| | | log.info("文件迁移成功: {} -> {}", tempFile.getTempPath(), formalFilePath); |
| | | |
| | | // 更新文件记录(关联到业务ID) |
| | |
| | | |
| | | try { |
| | | // 执行文件迁移(使用原子操作确保安全性) |
| | | Files.move( |
| | | Paths.get(tempFile.getTempPath()), |
| | | formalFilePath, |
| | | StandardCopyOption.REPLACE_EXISTING, |
| | | StandardCopyOption.ATOMIC_MOVE |
| | | ); |
| | | // Files.move( |
| | | // Paths.get(tempFile.getTempPath()), |
| | | // formalFilePath, |
| | | // StandardCopyOption.REPLACE_EXISTING, |
| | | // StandardCopyOption.ATOMIC_MOVE |
| | | // ); |
| | | // 原子移动失败,使用复制+删除 |
| | | Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.deleteIfExists(Paths.get(tempFile.getTempPath())); |
| | | log.info("文件迁移成功: {} -> {}", tempFile.getTempPath(), formalFilePath); |
| | | |
| | | // 更新文件记录(关联到业务ID) |
| | |
| | | |
| | | try { |
| | | // 执行文件迁移(使用原子操作确保安全性) |
| | | Files.move( |
| | | Paths.get(tempFile.getTempPath()), |
| | | formalFilePath, |
| | | StandardCopyOption.REPLACE_EXISTING, |
| | | StandardCopyOption.ATOMIC_MOVE |
| | | ); |
| | | // Files.move( |
| | | // Paths.get(tempFile.getTempPath()), |
| | | // formalFilePath, |
| | | // StandardCopyOption.REPLACE_EXISTING, |
| | | // StandardCopyOption.ATOMIC_MOVE |
| | | // ); |
| | | // 原子移动失败,使用复制+删除 |
| | | Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.deleteIfExists(Paths.get(tempFile.getTempPath())); |
| | | log.info("文件迁移成功: {} -> {}", tempFile.getTempPath(), formalFilePath); |
| | | |
| | | // 更新文件记录(关联到业务ID) |
| | |
| | | |
| | | try { |
| | | // 执行文件迁移(使用原子操作确保安全性) |
| | | Files.move( |
| | | Paths.get(tempFile.getTempPath()), |
| | | formalFilePath, |
| | | StandardCopyOption.REPLACE_EXISTING, |
| | | StandardCopyOption.ATOMIC_MOVE |
| | | ); |
| | | // Files.move( |
| | | // Paths.get(tempFile.getTempPath()), |
| | | // formalFilePath, |
| | | // StandardCopyOption.REPLACE_EXISTING, |
| | | // StandardCopyOption.ATOMIC_MOVE |
| | | // ); |
| | | // 原子移动失败,使用复制+删除 |
| | | Files.copy(Paths.get(tempFile.getTempPath()), formalFilePath, StandardCopyOption.REPLACE_EXISTING); |
| | | Files.deleteIfExists(Paths.get(tempFile.getTempPath())); |
| | | log.info("文件迁移成功: {} -> {}", tempFile.getTempPath(), formalFilePath); |
| | | |
| | | // 更新文件记录(关联到业务ID) |
| | |
| | | # 开发环境配置 |
| | | server: |
| | | # 服务器的HTTP端口,默认为8080 |
| | | port: 8092 |
| | | port: 9034 |
| | | servlet: |
| | | # 应用的访问路径 |
| | | context-path: / |
| | |
| | | # redis 配置 |
| | | redis: |
| | | # 地址 |
| | | host: 127.0.0.1 |
| | | # host: 172.17.0.1 |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端口,默认为6379 |
| | | port: 6379 |
| | | # 数据库索引 |
| | | database: 5 |
| | | # 密码 |
| | | password: root2022! |
| | | # password: |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # 连接超时时间 |
| | | timeout: 10s |
| | |
| | | # Spring配置 |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | active: dev |