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配置解决 :
server:port: 8080spring:application:name: platform-userdatasource:url: jdbc:mysql:///platform?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8username: rootpassword: rootmybatis:type-aliases-package: wackyboy.top.pojo
?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8 :这是要添加上的后缀,其中serverTimezone指定时区,useUnicode=true&characterEncoding=utf8用来指定编码格式为utf8
