Error: GlobalConfigUtils setMetaData Fail Cause:java.lang.NullPointerException

文章目录

  • 1、在开发中会出现这样的错误。
  • 2、其次,再看其他错误:

1、在开发中会出现这样的错误。

完整错误:Caused by: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: GlobalConfigUtils setMetaData Fail ! Cause:java.lang.NullPointerException

这是说明:数据库的连接及操作等出现了异常。首先定位到是操作数据库的问题。

2、其次,再看其他错误:

(1)Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘alertServiceImpl’: Unsatisfied dependency expressed through field ‘baseMapper’; nested exception is

(2)org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘alertMapper’ defined in file

(3)Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘alertMapper’ defined in file

上述原因都说明没有形成springboot 的完整依赖。

接下来去看数据库:

由此key可以看到是因为第一数据源注释了,启动找不到数据源连接,因此出现无法依赖,导致报错。

至此,打开数据源,即可正常启动项目。

你可能感兴趣的:(Java程序员进阶之路,java,oracle,开发语言)