mirror of https://gitee.com/stylefeng/roses
【7.0.4】更新druid配置
parent
8bd0b26a59
commit
374ae979a5
|
@ -33,6 +33,8 @@ import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
|||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* druid监控的自动配置类
|
||||
*
|
||||
|
@ -84,4 +86,15 @@ public class GunsDruidMonitorAutoConfiguration {
|
|||
return registrationBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解决druid discard long time none received connection问题
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/7/7 14:15
|
||||
*/
|
||||
@PostConstruct
|
||||
public void setProperties() {
|
||||
System.setProperty("druid.mysql.usePingMethod", "false");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue