为了账号安全,请及时绑定邮箱和手机立即绑定

项目启动失败

我使用的Idea,步骤和代码跟老师的一样,结果项目就是启动不起来,下面的是定位到的错误信息:
2021-10-08 00:49:28.686 ERROR 4612 --- [           main] o.s.boot.SpringApplication               : Application run failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userMapper' defined in file [D:\first\target\classes\com\mp\dao\UserMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

看了前面的相关回答说是application.yml配置问题

这是application.yml配置     
spring:
  datasource:
   driver-class-name: com.mysql.jdbc.Driver
   url: jdbc:mysql://localhost:3306/mp?useSSL=false&serverTimezone=GMT%2B8
   username: root
   password: xxxx


正在回答

1 回答

看看数据库是什么版本,你的驱动对应的是哪个版本

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

项目启动失败

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号