数据库初始化工具完善,执行init-db.bat自动建表和导入初始数据

This commit is contained in:
thinkgem
2018-02-08 21:53:44 +08:00
parent 143a2298da
commit a1c97e814a
8 changed files with 22 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ package com.jeesite.test;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ActiveProfiles;
import com.jeesite.modules.config.Application;
@@ -14,12 +15,14 @@ import com.jeesite.modules.config.Application;
* @author ThinkGem
* @version 2017-10-22
*/
@ActiveProfiles("test")
@SpringBootTest(classes=Application.class)
@Rollback(false)
public class InitCoreData extends com.jeesite.modules.sys.db.InitCoreData {
@Test
public void initCoreData() throws Exception{
createTable();
initLog();
initConfig();
initModule();

View File

@@ -6,21 +6,23 @@ package com.jeesite.test;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ActiveProfiles;
import com.jeesite.modules.config.Application;
/**
* 初始化代码生成表测试数据
* @author ThinkGem
* @version 2017-10-22
*/
@ActiveProfiles("test")
@SpringBootTest(classes=Application.class)
@Rollback(false)
public class InitGenData extends com.jeesite.modules.gen.db.InitGenData {
@Test
public void initGenData() throws Exception{
createGenTable();
initGenTreeData();
initGenTestData();
}