• Druid报错c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection.


    遇到Druid报错c.a.druid.pool.DruidAbstractDataSource:discard long time none received connection.

    简单做个记录叭~

    网上很多帖子说大概2个方法可以解决:

      1、类文件配置,增加配置(在我这里无效)

        @PostConstruct
        public void init(){
            // 处理 discard long time none received connection
            System.setProperty("druid.mysql.usePingMethod", "false");
        }

      2、相应调整了mysql的版本(在我这里也无效)

      3、在运行参数中增加:-Ddruid.mysql.usePingMethod=false(有效)

    nohup java -Ddruid.mysql.usePingMethod=false -jar user-0.0.1-SNAPSHOT.jar --server.port=9092  >user.out &
  • 相关阅读:
    Car HDU
    Defeat the Enemy UVALive
    Alice and Bob HDU
    Gone Fishing POJ
    Radar Installation POJ
    Supermarket POJ
    Moo Volume POJ
    Text Document Analysis CodeForces
    checkbox全选与反选

  • 原文地址:https://www.cnblogs.com/linnuo/p/15387068.html
Copyright © 2020-2023  润新知