Sfoglia il codice sorgente

feat:h2数据库备份第一次未加载

Hu Jie 6 anni fa
parent
commit
a80eef89eb

+ 2 - 0
src/main/java/com/uas/erp/database/UasDatabaseApplication.java

@@ -1,5 +1,6 @@
 package com.uas.erp.database;
 
+import com.uas.erp.database.support.BackupDBFileUtils;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -13,6 +14,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 public class UasDatabaseApplication {
 
     public static void main(String[] args) {
+        BackupDBFileUtils.init();
         new SpringApplicationBuilder(UasDatabaseApplication.class).web(true).run(args);
     }
 

+ 0 - 2
src/main/java/com/uas/erp/database/service/MasterService.java

@@ -49,8 +49,6 @@ public class MasterService implements InitializingBean{
         } else {
             BackupDBFileUtils.reserveFile();
             dbaRepository.flush();
-            dbas = dbaService.findAll();
-            System.out.println("dbas数量" + dbas.size());
         }
         BackupDBFileUtils.init();
     }