WinterChenS / my-site

springboot2.0开发的个人网站,集成了:个人首页,个人博客,个人作品
https://my.winterchen.com:8189
Apache License 2.0
3.23k stars 1.04k forks source link

启动报错 #53

Closed limeng3150 closed 3 years ago

limeng3150 commented 3 years ago

新人求指教,拉取项目代码后,在数据库里面创建了lu-tale.sql 这个文件里面所有的表,然后修改了application-dev.yml和application-prod.yml两个配置里面数据库的url和用户名/密码,然后启动引导类报错

rg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webLogAspect': Unsatisfied dependency expressed through field 'logService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logServiceImpl': Unsatisfied dependency expressed through field 'logDao'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logDao' defined in file [F:\self\my-web\target\classes\cn\luischen\dao\LogDao.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 [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.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 [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is java.sql.SQLException: connect error, url mysql://192.168..:3306/bdp?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true, driverClass com.mysql.jdbc.Driver at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]

WinterChenS commented 3 years ago

数据库链接有问题