init data sysout to logger

This commit is contained in:
thinkgem
2018-04-11 22:39:33 +08:00
parent b6183093fc
commit fbfe327bab
3 changed files with 175 additions and 230 deletions

View File

@@ -76,7 +76,6 @@ public class InitCoreData extends BaseInitDataTests {
* 区域、行政区划表 * 区域、行政区划表
*/ */
public void initArea() throws Exception{ public void initArea() throws Exception{
try{
clearTable(Area.class); clearTable(Area.class);
initExcelData(Area.class, new MethodCallback() { initExcelData(Area.class, new MethodCallback() {
@Override @Override
@@ -91,10 +90,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -103,7 +98,6 @@ public class InitCoreData extends BaseInitDataTests {
* 参数配置表 * 参数配置表
*/ */
public void initConfig() throws Exception{ public void initConfig() throws Exception{
try{
clearTable(Config.class); clearTable(Config.class);
initExcelData(Config.class, new MethodCallback() { initExcelData(Config.class, new MethodCallback() {
@Override @Override
@@ -119,10 +113,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -131,7 +121,6 @@ public class InitCoreData extends BaseInitDataTests {
* 系统模块表 * 系统模块表
*/ */
public void initModule() throws Exception{ public void initModule() throws Exception{
try{
clearTable(Module.class); clearTable(Module.class);
initExcelData(Module.class, new MethodCallback() { initExcelData(Module.class, new MethodCallback() {
@Override @Override
@@ -146,10 +135,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -160,7 +145,6 @@ public class InitCoreData extends BaseInitDataTests {
* 系统字典、用户字典表 * 系统字典、用户字典表
*/ */
public void initDict() throws Exception{ public void initDict() throws Exception{
try{
clearTable(DictType.class); clearTable(DictType.class);
initExcelData(DictType.class, new MethodCallback() { initExcelData(DictType.class, new MethodCallback() {
@Override @Override
@@ -191,10 +175,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -203,7 +183,6 @@ public class InitCoreData extends BaseInitDataTests {
* 角色表 * 角色表
*/ */
public void initRole() throws Exception{ public void initRole() throws Exception{
try{
clearTable(Role.class); clearTable(Role.class);
clearTable(RoleMenu.class); clearTable(RoleMenu.class);
clearTable(RoleDataScope.class); clearTable(RoleDataScope.class);
@@ -220,10 +199,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -234,7 +209,6 @@ public class InitCoreData extends BaseInitDataTests {
* 菜单表 * 菜单表
*/ */
public void initMenu() throws Exception{ public void initMenu() throws Exception{
try{
clearTable(Menu.class); clearTable(Menu.class);
clearTable(RoleMenu.class); clearTable(RoleMenu.class);
initExcelData(Menu.class, new MethodCallback() { initExcelData(Menu.class, new MethodCallback() {
@@ -254,10 +228,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -266,7 +236,6 @@ public class InitCoreData extends BaseInitDataTests {
* 用户表 * 用户表
*/ */
public void initUser() throws Exception{ public void initUser() throws Exception{
try{
clearTable(User.class); clearTable(User.class);
clearTable(UserRole.class); clearTable(UserRole.class);
clearTable(UserDataScope.class); clearTable(UserDataScope.class);
@@ -284,10 +253,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -296,7 +261,6 @@ public class InitCoreData extends BaseInitDataTests {
* 组织机构、部门表 * 组织机构、部门表
*/ */
public void initOffice() throws Exception{ public void initOffice() throws Exception{
try{
clearTable(Office.class); clearTable(Office.class);
initExcelData(Office.class, new MethodCallback() { initExcelData(Office.class, new MethodCallback() {
@Override @Override
@@ -311,10 +275,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -323,7 +283,6 @@ public class InitCoreData extends BaseInitDataTests {
* 公司表 * 公司表
*/ */
public void initCompany() throws Exception{ public void initCompany() throws Exception{
try{
clearTable(Company.class); clearTable(Company.class);
clearTable(CompanyOffice.class); clearTable(CompanyOffice.class);
initExcelData(Company.class, new MethodCallback() { initExcelData(Company.class, new MethodCallback() {
@@ -339,10 +298,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -351,7 +306,6 @@ public class InitCoreData extends BaseInitDataTests {
* 岗位表 * 岗位表
*/ */
public void initPost() throws Exception{ public void initPost() throws Exception{
try{
clearTable(Post.class); clearTable(Post.class);
initExcelData(Post.class, new MethodCallback() { initExcelData(Post.class, new MethodCallback() {
@Override @Override
@@ -366,10 +320,6 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
@Autowired @Autowired
@@ -378,7 +328,6 @@ public class InitCoreData extends BaseInitDataTests {
* 员工、用户表 * 员工、用户表
*/ */
public void initEmpUser() throws Exception{ public void initEmpUser() throws Exception{
try{
clearTable(Employee.class); clearTable(Employee.class);
clearTable(EmployeePost.class); clearTable(EmployeePost.class);
initExcelData(EmpUser.class, new MethodCallback() { initExcelData(EmpUser.class, new MethodCallback() {
@@ -410,9 +359,5 @@ public class InitCoreData extends BaseInitDataTests {
return null; return null;
} }
}); });
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
} }
} }

View File

@@ -36,6 +36,6 @@ echo.
cd %~dp0 cd %~dp0
cd ../ cd ../
call mvn test -Dtest=com.jeesite.test.InitCoreData,com.jeesite.test.InitGenData call mvn test -Dtest=com.jeesite.test.InitCoreData,com.jeesite.test.InitGenData -U
pause pause

View File

@@ -16,4 +16,4 @@ echo "\n[信息] 您真的确认继续吗否则请关闭窗口。1\n"
read -s -n1 -p "请按任意键继续 ... " read -s -n1 -p "请按任意键继续 ... "
cd .. cd ..
mvn test -Dtest=com.jeesite.test.InitCoreData,com.jeesite.test.InitGenData mvn test -Dtest=com.jeesite.test.InitCoreData,com.jeesite.test.InitGenData -U