【7.0.4】更新druid配置

pull/22/head
fengshuonan 2021-07-07 14:22:04 +08:00
parent 8bd0b26a59
commit 374ae979a5
1 changed files with 13 additions and 0 deletions

View File

@ -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");
}
}