【7.0.1】更新日志配置,修复数据源提示

pull/3/head
fengshuonan 2021-03-04 22:37:39 +08:00
parent 1b09a27578
commit 166b8d817e
2 changed files with 14 additions and 3 deletions

View File

@ -150,8 +150,7 @@ public class DatabaseInfoServiceImpl extends ServiceImpl<DatabaseInfoMapper, Dat
Class.forName(param.getJdbcDriver());
conn = DriverManager.getConnection(param.getJdbcUrl(), param.getUsername(), param.getPassword());
} catch (Exception e) {
String userTip = StrUtil.format(VALIDATE_DATASOURCE_ERROR.getUserTip(), param.getJdbcUrl());
throw new DatasourceContainerException(VALIDATE_DATASOURCE_ERROR, userTip);
throw new DatasourceContainerException(VALIDATE_DATASOURCE_ERROR, param.getJdbcUrl());
} finally {
if (conn != null) {
try {

View File

@ -3,6 +3,7 @@ package cn.stylefeng.roses.kernel.log.starter;
import cn.hutool.core.util.StrUtil;
import cn.hutool.system.SystemUtil;
import cn.stylefeng.roses.kernel.log.api.LogManagerApi;
import cn.stylefeng.roses.kernel.log.api.LogRecordApi;
import cn.stylefeng.roses.kernel.log.api.enums.LogSaveTypeEnum;
import cn.stylefeng.roses.kernel.log.api.expander.LogConfigExpander;
import cn.stylefeng.roses.kernel.log.api.pojo.log.SysLogProperties;
@ -67,7 +68,7 @@ public class GunsLogAutoConfiguration {
* db-file-
*
* @param sysLogProperties
* @param sysLogService service
* @param sysLogService service
* @author liuhanqing
* @date 2020/12/20 13:02
*/
@ -122,4 +123,15 @@ public class GunsLogAutoConfiguration {
return new DbLogManagerServiceImpl();
}
/**
* api
*
* @author fengshuonan
* @date 2021/3/4 22:16
*/
@Bean
public LogRecordApi logRecordApi(SysLogServiceImpl sysLogService) {
return new DbLogRecordServiceImpl(new LogManagerThreadPool(), sysLogService);
}
}