spring boot 启动失败,求解

提问
3 673

6 months ago

2022-12-03 02:16:07.454 WARN 26156 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationEvents' defined in file [E:\xysheji\gitee\down\maku\maku-boot\maku-boot-system\target\classes\net\maku\security\event\AuthenticationEvents.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysLogLoginServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysLogLoginDao' defined in file [E:\xysheji\gitee\down\maku\maku-boot\maku-boot-system\target\classes\net\maku\system\dao\SysLogLoginDao.class]: Cannot resolve reference to bean 'sqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionTemplate' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionTemplate' parameter 0; 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/DataSourceConfigurationHikari.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.DataSourcePropertiesDataSourceBeanCreationException: Failed to determine a suitable driver class
2022-12-03 02:16:07.469 INFO 26156 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-12-03 02:16:07.485 INFO 26156 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-12-03 02:16:07.508 ERROR 26156 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class

Action:

Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

进程已结束,退出代码为 1

回帖
maku 6 months ago

这个是maku-cloud项目吧,没有导入nacos配置文件或者没有连接上nacos

去看下文档了 https://maku.net/docs/maku-cloud/498404

回复
xysheji  (楼主) 6 months ago

@maku 是maku-boot的不是maku-cloud

回复
w15524257426 6 months ago

检查你的数据库url配置

回复
提交回复
温馨通道
回贴总榜