Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'argueController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'argueMapper' defined in file [D:\IDEA-2021.1.3\Project\yc-learn\myblog\myblog\target\classes\com\example\myblog\mapper\ArgueMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
时间: 2024-04-20 20:24:02 浏览: 242
测试spring中的org.springframework.beans.factory.InitializingBean
这个异常是由于在初始化过程中遇到了错误导致的。具体错误信息是关于依赖注入失败的问题,其中涉及到了一个名为'argueController'的bean以及'argueMapper'和'sqlSessionFactory'的创建问题。
在这个异常信息中还提到了一个与数据库连接相关的问题,即在创建dataSource时出现了错误。具体的错误信息是无法确定合适的驱动程序类。
这些错误可能是由于配置文件或依赖项的问题引起的。建议检查相关的配置文件,确保数据库连接配置正确,并且所有必要的依赖项都已正确引入。如果需要进一步帮助,请提供更多的详细信息。
阅读全文