123456789101112131415161718192021222324252627282930313233343536 |
- package camel.monitor.route;
- import com.mongodb.MongoClient;
- import org.apache.camel.builder.RouteBuilder;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.data.mongodb.core.MongoOperations;
- import org.springframework.stereotype.Component;
- /**
- * Created by l4qiang on 2017-06-16.
- */
- @Component
- public class MonitorRouter extends RouteBuilder {
- @Autowired
- private MongoClient mongoClient;
- @Autowired
- private MongoOperations mongoOperations;
- @Override
- public void configure() throws Exception {
- System.out.println("MonitorRouterBulider configure 111111111----------------");
- System.out.println("mongoClient:"+(mongoClient==null));
- System.out.println("mongoOperations:"+(mongoOperations==null));
- // from("quartz://monitor/logMonitorRoute?cron=0 0/1 * * * ?").routeId("logMonitorRoute")
- // .to("bean:monitorService?method=monitor")
- //// .bean(MonitorService.class,"monitor")
- // ;
- }
- }
|