DruidDataSource dataSource = new DruidDataSource();
dataSource.setUsername("xxx");
dataSource.setPassword("xxx");
dataSource.setUrl("jdbc:mysql://xxx/xxxx?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8"); dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
Connection connection = dataSource.getConnection();