Browse Source

linux服务发布异常整改

zhenglingfeng 8 years ago
parent
commit
56392667a0

+ 13 - 1
hos-broker/pom.xml

@ -6,7 +6,7 @@
    <groupId>com.yihu.hos</groupId>
    <artifactId>hos-broker</artifactId>
    <version>1.1.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    <packaging>war</packaging>
    <name>hos-broker</name>
    <description>ESB服务运行模块</description>
@ -55,6 +55,18 @@
            <groupId>com.yihu.hos</groupId>
            <artifactId>hos-web-framework</artifactId>
            <version>1.1.1-SNAPSHOT</version>
            <exclusions>
                <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>1.4.1.RELEASE</version>
            <!--<scope>provided</scope>-->
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.camel/camel-stream -->
        <!-- sigar -->

+ 10 - 1
hos-broker/src/main/java/com/yihu/hos/HosBrokerApplication.java

@ -5,11 +5,13 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
@EnableScheduling
public class HosBrokerApplication {
public class HosBrokerApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
@ -17,4 +19,11 @@ public class HosBrokerApplication {
        app.addListeners(new ApplicationStartListener());
        app.run(args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        builder.sources(this.getClass());
        builder.listeners(new ApplicationStartListener());
        return super.configure(builder);
    }
}

+ 1 - 2
hos-broker/src/main/java/com/yihu/hos/common/listener/ApplicationStartListener.java

@ -69,8 +69,7 @@ public class ApplicationStartListener implements ApplicationListener<ContextRefr
            //默认所有class均为正确
            isCorrectClassMap.put(code, true);
            // 这是system业务系统在本地存储class的根目录
            File systemClassFlowPath = new File(ClassLoader.getSystemResource("").getPath() + "/" + code);
            File systemClassFlowPath = new File(this.getClass().getProtectionDomain().getClassLoader().getResource("").getPath() + "/" + code);
            List<SystemServiceFlowClass> processesClassList = systemServiceFlowClassGroupMap.get("processor" + flowId);
            List<SystemServiceFlowClass> routesClassList = systemServiceFlowClassGroupMap.get("route" + flowId);
            // 创建processor文件

+ 4 - 5
hos-camel/src/main/java/qlc/route/QlcRouteBulider.java

@ -13,12 +13,11 @@ public class QlcRouteBulider extends RouteBuilder {
    @Override
    public void configure() throws Exception {
        from("jetty:http4://192.168.131.111:8066/qlc").routeId("qlc")
        from("jetty:http4://172.17.110.178:9088/qlc").routeId("qlc")
                .process(new Processor1()).setHeader(Exchange.HTTP_METHOD, constant("POST")).log("servers: 3,code: queryUserInfo,order: 1")
                .to("http4://192.168.131.111:8088/api/v1.0/qlc/queryUserInfo").log("servers: 3,code: queryUserInfo,order: 1")
                .to("http4://172.19.103.89:8088/api/v1.0/qlc/queryUserInfo").log("servers: 3,code: queryUserInfo,order: 1")
                .process(new Processor2()).setHeader(Exchange.HTTP_METHOD, constant("POST")).log("servers: 3,code: patientInformation,order: 1")
                .to("http4://192.168.131.111:8088/api/v1.0/qlc/patientInformation").log("servers: 3,code: patientInformation,order: 1")
                .process(new Processor2()).setHeader(Exchange.HTTP_METHOD, constant("POST")).log("servers: 3,code: patient,order: 1")
                .to("http4://192.168.131.111:8088/crawler/patient").log("servers: 3,code: patient,order: 1").to("stream:out"); // 2. 为路由配置组件或终端节点.
                .to("http4://172.19.103.89:8088/api/v1.0/qlc/patientInformation").log("servers: 3,code: patientInformation,order: 1")
                .process(new Processor2()).setHeader(Exchange.HTTP_METHOD, constant("POST")).to("stream:out"); // 2. 为路由配置组件或终端节点.
    }
}

File diff suppressed because it is too large
+ 11 - 11
hos-rest/src/main/java/com/yihu/hos/rest/services/crawler/CollectHelper.java


+ 3 - 3
hos-rest/src/main/java/com/yihu/hos/rest/services/crawler/CrawlerService.java

@ -549,7 +549,7 @@ public class CrawlerService {
        return list;
    }
    public static void main(String[] args) {
//    public static void main(String[] args) {
//        try {
//        List<EhrCondition> queryParams = new ArrayList<>();
//        queryParams.add(new EhrCondition(" = ","_id","579091357a2b8f19b0000001" ));
@ -575,8 +575,8 @@ public class CrawlerService {
//            e.printStackTrace();
//        }
//        testGetBlob();
        testFetch();
    }
//        testFetch();
//    }
    /**
     * TODO  采集测试,之后删除