Commit b426e4d2a9f3d803d58b06b5cbbaeab43dd6d83b
1 parent
1b2086af
update
Showing
1 changed file
with
10 additions
and
13 deletions
src/main/java/com/bsth/service/schedule/utils/DataImportExportServiceImpl.java
| 1 | package com.bsth.service.schedule.utils; | 1 | package com.bsth.service.schedule.utils; |
| 2 | 2 | ||
| 3 | import com.google.common.io.Files; | 3 | import com.google.common.io.Files; |
| 4 | -import org.pentaho.di.core.KettleEnvironment; | ||
| 5 | -import org.pentaho.di.core.util.EnvUtil; | ||
| 6 | import org.pentaho.di.trans.Trans; | 4 | import org.pentaho.di.trans.Trans; |
| 7 | import org.pentaho.di.trans.TransMeta; | 5 | import org.pentaho.di.trans.TransMeta; |
| 8 | import org.springframework.beans.factory.InitializingBean; | 6 | import org.springframework.beans.factory.InitializingBean; |
| @@ -12,8 +10,6 @@ import org.springframework.stereotype.Service; | @@ -12,8 +10,6 @@ import org.springframework.stereotype.Service; | ||
| 12 | import org.springframework.web.multipart.MultipartFile; | 10 | import org.springframework.web.multipart.MultipartFile; |
| 13 | 11 | ||
| 14 | import java.io.File; | 12 | import java.io.File; |
| 15 | -import java.util.HashMap; | ||
| 16 | -import java.util.Map; | ||
| 17 | 13 | ||
| 18 | /** | 14 | /** |
| 19 | * Created by xu on 16/6/23. | 15 | * Created by xu on 16/6/23. |
| @@ -27,15 +23,16 @@ public class DataImportExportServiceImpl implements DataImportExportService, Ini | @@ -27,15 +23,16 @@ public class DataImportExportServiceImpl implements DataImportExportService, Ini | ||
| 27 | 23 | ||
| 28 | @Override | 24 | @Override |
| 29 | public void afterPropertiesSet() throws Exception { | 25 | public void afterPropertiesSet() throws Exception { |
| 30 | - // 初始化kettle环境 | ||
| 31 | - EnvUtil.environmentInit(); | ||
| 32 | - // 添加全局ktr变量,并覆盖原来的设置 | ||
| 33 | - Map<String, String> kvars = new HashMap<>(); | ||
| 34 | - kvars.put("v_db_ip", dataToolsProperties.getKvarsDbip()); | ||
| 35 | - kvars.put("v_db_uname", dataToolsProperties.getKvarsDbuname()); | ||
| 36 | - kvars.put("v_db_pwd", dataToolsProperties.getKvarsDbpwd()); | ||
| 37 | - EnvUtil.applyKettleProperties(kvars, true); | ||
| 38 | - KettleEnvironment.init(); | 26 | + // TODO:有可能会报错,待会儿再改 |
| 27 | +// // 初始化kettle环境 | ||
| 28 | +// EnvUtil.environmentInit(); | ||
| 29 | +// // 添加全局ktr变量,并覆盖原来的设置 | ||
| 30 | +// Map<String, String> kvars = new HashMap<>(); | ||
| 31 | +// kvars.put("v_db_ip", dataToolsProperties.getKvarsDbip()); | ||
| 32 | +// kvars.put("v_db_uname", dataToolsProperties.getKvarsDbuname()); | ||
| 33 | +// kvars.put("v_db_pwd", dataToolsProperties.getKvarsDbpwd()); | ||
| 34 | +// EnvUtil.applyKettleProperties(kvars, true); | ||
| 35 | +// KettleEnvironment.init(); | ||
| 39 | } | 36 | } |
| 40 | 37 | ||
| 41 | @Override | 38 | @Override |