Skip to content

Commit 8e7f0ea

Browse files
committed
处理未扫描到的mybatis包
1 parent be97df7 commit 8e7f0ea

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
lines changed

conf/dss-server.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ wds.linkis.server.mybatis.mapperLocations=classpath*:com/webank/wedatasphere/dss
1515

1616
wds.linkis.server.mybatis.typeAliasesPackage=com.webank.wedatasphere.dss.application.entity,com.webank.wedatasphere.dss.common.entity,com.webank.wedatasphere.dss.framework.workspace.bean,com.webank.wedatasphere.dss.framework.project.entity,com.webank.wedatasphere.dss.framework.appconn.entity,com.webank.wedatasphere.dss.framework.release.entity,com.webank.wedatasphere.dss.framework.admin.pojo.entity,com.webank.wedatasphere.dss.server.entity,com.webank.wedatasphere.dss.application.entity,com.webank.wedatasphere.dss.framework.appconn.entity,com.webank.wedatasphere.dss.workflow.entity,com.webank.wedatasphere.dss.framework.appconn.entity,com.webank.wedatasphere.dss.scriptis.pojo.entity,com.webank.wedatasphere.dss.common.entity,com.webank.wedatasphere.dss.guide.server.entity
1717

18-
wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.dss.framework.workspace.dao,com.webank.wedatasphere.dss.application.dao,com.webank.wedatasphere.dss.framework.project.dao,com.webank.wedatasphere.dss.framework.appconn.dao,com.webank.wedatasphere.dss.framework.release.dao,com.webank.wedatasphere.dss.orchestrator.db.dao,com.webank.wedatasphere.dss.framework.admin.xml,com.webank.wedatasphere.dss.common.server.dao,com.webank.wedatasphere.dss.orchestrator.core.dao,com.webank.wedatasphere.dss.server.dao,com.webank.wedatasphere.dss.application.dao,com.webank.wedatasphere.dss.workspace.mapper,com.webank.wedatasphere.dss.workspace.common.dao,com.webank.wedatasphere.dss.workspace.common.dao,com.webank.wedatasphere.dss.orchestrator.db.dao,com.webank.wedatasphere.dss.flow.execution.entrance.dao,org.apache.linkis.jobhistory.dao,com.webank.wedatasphere.dss.workflow.dao,com.webank.wedatasphere.dss.scriptis.dao,com.webank.wedatasphere.dss.common.dao,com.webank.wedatasphere.dss.guide.server.dao
18+
wds.linkis.server.mybatis.BasePackage=org.apache.linkis.publicservice.common.lock.dao,com.webank.wedatasphere.dss.framework.workspace.dao,com.webank.wedatasphere.dss.application.dao,com.webank.wedatasphere.dss.framework.project.dao,com.webank.wedatasphere.dss.framework.appconn.dao,com.webank.wedatasphere.dss.framework.release.dao,com.webank.wedatasphere.dss.orchestrator.db.dao,com.webank.wedatasphere.dss.framework.admin.xml,com.webank.wedatasphere.dss.common.server.dao,com.webank.wedatasphere.dss.orchestrator.core.dao,com.webank.wedatasphere.dss.server.dao,com.webank.wedatasphere.dss.application.dao,com.webank.wedatasphere.dss.workspace.mapper,com.webank.wedatasphere.dss.workspace.common.dao,com.webank.wedatasphere.dss.workspace.common.dao,com.webank.wedatasphere.dss.orchestrator.db.dao,com.webank.wedatasphere.dss.flow.execution.entrance.dao,org.apache.linkis.jobhistory.dao,com.webank.wedatasphere.dss.workflow.dao,com.webank.wedatasphere.dss.scriptis.dao,com.webank.wedatasphere.dss.common.dao,com.webank.wedatasphere.dss.guide.server.dao
1919

2020
####project
2121
wds.dss.appconn.checker.development.ignore.list=orchestrator-framework,workflow,sendemail,sparketl

dss-framework/dss-framework-orchestrator-server/pom.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,6 @@
201201
<version>${dss.version}</version>
202202
<scope>provided</scope>
203203
</dependency>
204-
<dependency>
205-
<groupId>org.apache.linkis</groupId>
206-
<artifactId>linkis-pes-publicservice</artifactId>
207-
<version>${linkis.version}</version>
208-
<exclusions>
209-
<exclusion>
210-
<artifactId>spring-context-support</artifactId>
211-
<groupId>org.springframework</groupId>
212-
</exclusion>
213-
</exclusions>
214-
</dependency>
215204
<dependency>
216205
<groupId>org.apache.linkis</groupId>
217206
<artifactId>linkis-storage</artifactId>

dss-framework/dss-framework-orchestrator-server/src/main/java/com/webank/wedatasphere/dss/orchestrator/server/restful/OrchestratorIERestful.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
import com.webank.wedatasphere.dss.standard.app.sso.Workspace;
3939
import com.webank.wedatasphere.dss.standard.sso.utils.SSOHelper;
4040
import org.apache.commons.io.IOUtils;
41+
import org.apache.linkis.common.io.Fs;
4142
import org.apache.linkis.common.io.FsPath;
42-
import org.apache.linkis.filesystem.service.FsService;
4343
import org.apache.linkis.server.Message;
4444
import org.apache.linkis.server.security.SecurityFilter;
45-
import org.apache.linkis.storage.fs.FileSystem;
45+
import org.apache.linkis.storage.FSFactory;
4646
import org.slf4j.Logger;
4747
import org.slf4j.LoggerFactory;
4848
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,6 +58,7 @@
5858
import java.io.IOException;
5959
import java.io.InputStream;
6060
import java.util.Arrays;
61+
import java.util.HashMap;
6162
import java.util.List;
6263
import java.util.Map;
6364

@@ -69,8 +70,6 @@ public class OrchestratorIERestful {
6970
@Qualifier("orchestratorBmlService")
7071
private BMLService bmlService;
7172
@Autowired
72-
private FsService fsService;
73-
@Autowired
7473
OrchestratorService orchestratorService;
7574
@Autowired
7675
private DSSOrchestratorContext orchestratorContext;
@@ -93,22 +92,25 @@ public Message importOrcFile(HttpServletRequest req,
9392
Workspace workspace = SSOHelper.getWorkspace(req);
9493
InputStream inputStream;
9594
String fileName;
95+
BmlResource resultMap=null;
9696
if (packageFile != null) {
9797
inputStream = packageFile.getInputStream();
9898
fileName = new String(packageFile.getOriginalFilename().getBytes("ISO8859-1"), "UTF-8");
9999
//3、打包新的zip包上传BML
100100
logger.info("User {} begin to import orchestrator file", userName);
101+
resultMap = bmlService.upload(userName, inputStream, fileName, projectName);
101102
} else {
102103
FsPath fsPath = new FsPath(packageUri);
103-
FileSystem fileSystem = fsService.getFileSystem(userName, fsPath);
104-
if ( !fileSystem.exists(fsPath) ) {
105-
throw new DSSRuntimeException("路径上不存在文件!");
104+
try(Fs fileSystem = FSFactory.getFsByProxyUser(fsPath, userName)) {
105+
fileSystem.init(new HashMap<String, String>());
106+
if (!fileSystem.exists(fsPath)) {
107+
throw new DSSRuntimeException("路径上不存在文件!");
108+
}
109+
inputStream = fileSystem.read(fsPath);
110+
fileName = packageUri.substring(packageUri.lastIndexOf('/') + 1);
111+
resultMap = bmlService.upload(userName, inputStream, fileName, projectName);
106112
}
107-
inputStream = fileSystem.read(fsPath);
108-
fileName = packageUri.substring(packageUri.lastIndexOf('/') + 1);
109113
}
110-
111-
BmlResource resultMap = bmlService.upload(userName, inputStream, fileName, projectName);
112114
DSSOrchestratorVersion dssOrchestratorVersion;
113115
try {
114116
RequestImportOrchestrator importRequest = new RequestImportOrchestrator(userName, projectName,

0 commit comments

Comments
 (0)