数据库初始化工具完善,执行init-db.bat自动建表和导入初始数据
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user