一.cpsJob开发环境搭建:
- 启动elastic-job:
elastic-job-lite-console-3.0.0.M1-SNAPSHOT\bin\start.bat
访问地址:http://localhost:8899 root/root - 启动zookeeper
zookeeper-3.4.6\bin\zkServer.cmd - 发布cpsJob后,配置elastic-job控制台
<reg:zookeeper id=“regCenter” server-lists=“10.43.42.7:2181” namespace=“tss-cpsJob” …… />
在本地调试时server-lists为本地ip,在job中可灵活使用分片项参数sharding-item-parameters=“0=2/UAT5”
public void execute(ShardingContext arg0) {
logger.info(" matchjob执行开始--> " + "分片参数1:" + arg0.getShardingItem());
logger.info(" matchjob执行开始--> " + "分片参数2:" + arg0.getShardingParameter());
二.cpsMq开发环境搭建
- 启动activemq
apache-activemq-5.10.1\bin\win64\ activemq.bat
2,控制台
http://localhost:8161/ admin/admin