提交 6b2454b1 编写于 作者: O o2sword

自建表分应用编译2

上级 d817bca8
......@@ -9,6 +9,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import com.x.base.core.entity.dynamic.DynamicBaseEntity;
import com.x.base.core.entity.dynamic.DynamicEntity;
import com.x.base.core.project.tools.ListTools;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.FileFilterUtils;
import org.apache.commons.io.filefilter.IOFileFilter;
......@@ -90,10 +93,10 @@ public abstract class JettySeverTools {
jars.add(file.getAbsolutePath());
}
}
for (String str : module.dynamicJars()) {
File file = new File(Config.dir_dynamic_jars(), str + ".jar");
if (file.exists()) {
jars.add(file.getAbsolutePath());
if (module.dynamicJars()!=null && module.dynamicJars().length > 0) {
IOFileFilter filter = new WildcardFileFilter(DynamicEntity.JAR_PREFIX + "*.jar");
for (File o : FileUtils.listFiles(Config.dir_dynamic_jars(), filter, null)) {
jars.add(o.getAbsolutePath());
}
}
for (Path path : paths) {
......
......@@ -40,6 +40,7 @@ class ActionBuildTable extends BaseAction {
for(Query query : queryList){
business.buildAllTable(query.getId());
}
jar.delete();
wo.setValue(true);
}else {
wo.setValue(business.buildAllTable(queryId));
......
......@@ -25,9 +25,9 @@ class ActionBuildTableDispatch extends BaseAction {
private static Logger logger = LoggerFactory.getLogger(ActionBuildTableDispatch.class);
ActionResult<Wo> execute(EffectivePerson effectivePerson, String queryId) throws Exception {
ActionResult<Wo> result = new ActionResult<>();
Wo wo = new Wo();
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
ActionResult<Wo> result = new ActionResult<>();
Wo wo = new Wo();
Business business = new Business(emc);
if (!business.controllable(effectivePerson)) {
throw new ExceptionAccessDenied(effectivePerson);
......@@ -36,24 +36,24 @@ class ActionBuildTableDispatch extends BaseAction {
if (null == query) {
throw new ExceptionEntityNotExist(queryId, Query.class);
}
List<Application> apps = ThisApplication.context().applications().get(x_query_assemble_designer.class);
if (ListTools.isNotEmpty(apps)) {
apps.stream().forEach(o -> {
String url = o.getUrlJaxrsRoot() + "table/"+ queryId +"/build?tt="+System.currentTimeMillis();
logger.info("{} do dispatch build query {} table request to : {}", effectivePerson.getDistinguishedName(), queryId, url);
try {
CipherConnectionAction.get(effectivePerson.getDebugger(), url);
} catch (Exception e) {
e.printStackTrace();
}
});
}
wo.setValue(true);
}
List<Application> apps = ThisApplication.context().applications().get(x_query_assemble_designer.class);
if (ListTools.isNotEmpty(apps)) {
apps.stream().forEach(o -> {
String url = o.getUrlJaxrsRoot() + "table/"+ queryId +"/build?tt="+System.currentTimeMillis();
logger.info("{} do dispatch build query {} table request to : {}", effectivePerson.getDistinguishedName(), queryId, url);
try {
CipherConnectionAction.get(effectivePerson.getDebugger(), url);
} catch (Exception e) {
e.printStackTrace();
}
});
}
wo.setValue(true);
result.setData(wo);
result.setData(wo);
return result;
}
return result;
}
public static class Wo extends WrapBoolean {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册