mirror of
https://github.com/vran-dev/databasir.git
synced 2025-08-09 02:48:26 +08:00
fix: checkstyle
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user