【更新】去掉启动项目时数据库密码强校验,配置数据库信息错误提示细化
This commit is contained in:
parent
e16f357197
commit
b5fe342bd0
@ -87,7 +87,7 @@ public class ConstantsInitListener implements ApplicationListener<ApplicationCon
|
|||||||
ConstantContext.putConstant(CommonConstant.DATABASE_USER_NAME, dataSourceUsername);
|
ConstantContext.putConstant(CommonConstant.DATABASE_USER_NAME, dataSourceUsername);
|
||||||
|
|
||||||
// 如果有为空的配置,终止执行
|
// 如果有为空的配置,终止执行
|
||||||
if (ObjectUtil.hasEmpty(dataSourceUrl, dataSourceUsername, dataSourcePassword)) {
|
if (ObjectUtil.hasEmpty(dataSourceUrl, dataSourceUsername)) {
|
||||||
throw new ServiceException(SysConfigExceptionEnum.DATA_SOURCE_NOT_EXIST);
|
throw new ServiceException(SysConfigExceptionEnum.DATA_SOURCE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public enum SysConfigExceptionEnum implements AbstractBaseExceptionEnum {
|
|||||||
/**
|
/**
|
||||||
* 数据库连接配置不存在
|
* 数据库连接配置不存在
|
||||||
*/
|
*/
|
||||||
DATA_SOURCE_NOT_EXIST(1, "数据库连接配置不存在,请检查spring.datasource配置"),
|
DATA_SOURCE_NOT_EXIST(1, "数据库连接配置不存在,请检查spring.datasource配置用户名密码是否正确"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统参数配置不存在
|
* 系统参数配置不存在
|
||||||
|
Loading…
x
Reference in New Issue
Block a user