fix: checkstyle

This commit is contained in:
vran 2022-03-11 23:17:00 +08:00
parent 0333ecc8ae
commit 6deb8b92e9
2 changed files with 8 additions and 4 deletions

View File

@ -19,14 +19,15 @@ public class RestTemplateConfig {
restTemplate.getMessageConverters().set(1,
new StringHttpMessageConverter(StandardCharsets.UTF_8));
return restTemplate;
}
@Bean
public ClientHttpRequestFactory simpleClientHttpRequestFactory() {
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
factory.setReadTimeout(1000 * 30);//单位为ms
factory.setConnectTimeout(1000 * 5);//单位为ms
//单位为ms
factory.setReadTimeout(1000 * 30);
//单位为ms
factory.setConnectTimeout(1000 * 5);
return factory;
}
}

View File

@ -65,7 +65,10 @@ public class CustomDatabaseConnectionFactory implements DatabaseConnectionFactor
} catch (ClassNotFoundException e) {
log.error("init driver error", e);
throw DomainErrors.CONNECT_DATABASE_FAILED.exception("驱动初始化异常, 请检查 Driver name" + e.getMessage());
} catch (InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodException e) {
} catch (InvocationTargetException
| InstantiationException
| IllegalAccessException
| NoSuchMethodException e) {
log.error("init driver error", e);
throw DomainErrors.CONNECT_DATABASE_FAILED.exception("驱动初始化异常:" + e.getMessage());
}