错误Error creating bean with name 'captchaController': Unsatisfied dependency expressed through field 'configService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigServiceImpl': Unsatisfied dependency expressed through field 'configMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigMapper' defined in file [G:\ruoyi-vue3\RuoYi-Vue-master\ruoyi-system\target\classes\com\ruoyi\system\mapper\SysConfigMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ruoyi/framework/config/MyBatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException: Cannot invoke "String.split(String)" because "typeAliasesPackage" is null
时间: 2023-05-27 18:06:03 浏览: 253
spring boot整合mybatis-plus启动报错问题及解答.pdf
该错误是因为在创建bean时,其中一个依赖的属性为null,导致无法创建该bean。具体地,是因为在创建名为‘captchaController’的bean时,它依赖的属性‘configService’为null,而导致创建该bean失败。而‘configService’的创建也依赖于属性‘configMapper’,同样因为该属性为null而无法创建该bean。最终,是由于创建‘sqlSessionFactory’失败,而导致‘configMapper’的创建失败,进而导致整个依赖链的创建失败。可能的原因是没有正确地配置相关的类或属性,或者是由于版本兼容性等问题导致。
阅读全文