fix: checkstyle
This commit is contained in:
parent
0333ecc8ae
commit
6deb8b92e9
|
@ -19,14 +19,15 @@ public class RestTemplateConfig {
|
||||||
restTemplate.getMessageConverters().set(1,
|
restTemplate.getMessageConverters().set(1,
|
||||||
new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
||||||
return restTemplate;
|
return restTemplate;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public ClientHttpRequestFactory simpleClientHttpRequestFactory() {
|
public ClientHttpRequestFactory simpleClientHttpRequestFactory() {
|
||||||
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
||||||
factory.setReadTimeout(1000 * 30);//单位为ms
|
//单位为ms
|
||||||
factory.setConnectTimeout(1000 * 5);//单位为ms
|
factory.setReadTimeout(1000 * 30);
|
||||||
|
//单位为ms
|
||||||
|
factory.setConnectTimeout(1000 * 5);
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,10 @@ public class CustomDatabaseConnectionFactory implements DatabaseConnectionFactor
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
log.error("init driver error", e);
|
log.error("init driver error", e);
|
||||||
throw DomainErrors.CONNECT_DATABASE_FAILED.exception("驱动初始化异常, 请检查 Driver name:" + e.getMessage());
|
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);
|
log.error("init driver error", e);
|
||||||
throw DomainErrors.CONNECT_DATABASE_FAILED.exception("驱动初始化异常:" + e.getMessage());
|
throw DomainErrors.CONNECT_DATABASE_FAILED.exception("驱动初始化异常:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue