1、

初步搭建springboot应用,报错:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedd

  • 按照错误提示,首先查看你配置的数据源是否有问题
  • 看看pom文件里面 有没有打包成pom,打包成pom指的是 pom.xml文件上面的pom,有的话去掉

**

2、

整合mybatis时出现:java.sql.SQLException: The server time zone value ‘�й���׼的问题

yml配置解决

  1. server:
  2. port: 8080
  3. spring:
  4. application:
  5. name: platform-user
  6. datasource:
  7. url: jdbc:mysql:///platform?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
  8. username: root
  9. password: root
  10. mybatis:
  11. type-aliases-package: wackyboy.top.pojo

?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8 :这是要添加上的后缀,其中serverTimezone指定时区,useUnicode=true&characterEncoding=utf8用来指定编码格式为utf8