瀏覽代碼

修改代码

chenweida 7 年之前
父節點
當前提交
f699b170f8

+ 7 - 0
patient-co/patient-co-wlyy-job/pom.xml

@ -428,6 +428,13 @@
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>

+ 4 - 4
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/redis/RedisThread.java

@ -41,14 +41,14 @@ public class RedisThread implements Runnable {
        poolConfig.setMaxTotal(8);
        poolConfig.setMaxWaitMillis(-1);
        poolConfig.setMinIdle(1);
        JedisPool pool = new JedisPool(poolConfig,host,port,100000);
        JedisPool pool = new JedisPool(poolConfig,host,port,100000,password);
        while (true){
            try {
                Jedis jedis = pool.getResource();
                if(StringUtils.isNotBlank(password)){
                    jedis.auth(password);
                }
//                if(StringUtils.isNotBlank(password)){
//                    jedis.auth(password);
//                }
                String message = jedis.rpop(key);
                if(StringUtils.isEmpty(message)){
                    Thread.sleep(1000L);//如果没有读取到记录,等待1秒

+ 6 - 6
patient-co/patient-co-wlyy-job/src/main/resources/application.yml

@ -1,5 +1,6 @@
server:
  port: 8080
  context-path: /wlyy-job
spring:
  datasource:
@ -182,21 +183,20 @@ express:
##正式的配置
spring:
  profiles: prod
  datasource:
    wlyy:
      url: jdbc:mysql://59.61.92.90:8079/wlyy?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
      username: jkzl_root
      password: jkzlehr@321465
      username: wlyy
      password: jkzlehr@123
    health:
      url: jdbc:mysql://59.61.92.90:8079/device?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true
#      username: wlyy
#      password: jkzlehr@321465
      username: jkzl_root
      password: jkzlehr@321465
      username: wlyy
      password: jkzlehr@123
  redis:
    host: 120.41.253.95 # Redis server host.
    host: 27.155.101.77 # Redis server host.
    port: 6380 # Redis server port.
    password: jkzl_ehr