修改生产环境配置

This commit is contained in:
zhouxiunai
2019-01-29 14:44:19 +08:00
parent 9f80b92587
commit 82e39bf91c
2 changed files with 47 additions and 3 deletions
+9 -3
View File
@@ -13,14 +13,14 @@ spring:
test-on-borrow: true
initial-size: 3
redis:
cluster:
nodes: 172.17.35.160:6379,172.17.35.160:6380,172.17.35.161:6379,172.17.35.161:6380,172.17.35.162:6379,172.17.35.162:6380
password:
port: 6379
pool:
max-idle: 10
min-idle: 0
max-active: 200
max-wait: -1
host: 172.17.35.165
timeout: 1000
kafka:
producer:
@@ -92,4 +92,10 @@ eureka:
service-url:
defaultZone: http://172.17.35.163:94/eureka/
instance:
prefer-ip-address: true
prefer-ip-address: true
adminApi:
host: 172.17.35.163
port: 92
schema: http
baseUrl: ${adminApi.schema}://ADMINAPI
ormsStandsUrl: ${adminApi.baseUrl}/basicdata/ormsStands
@@ -0,0 +1,38 @@
package com.gzzn.omms.msgexchangeapi.runner;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class ScheduledExecutorServiceTest {
@Test
public void testRun()
{
//启动消息采集线程
ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
System.out.println("start ...");
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("end ...");
}
}, 0, 1 , TimeUnit.SECONDS);
while (true) {
}
}//end function
}