在第三章shiro case2中,配置好shiro之后,启动项目发现连接不了数据库,并报错
create connection SQLException, url: jdbc:mysql://localhost:3306/oa?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8, errorCode 0, state 08001
在properties配置是这样的:
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/oa?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8
spring.datasource.data-username=root
spring.datasource.password=mysql123
在pom也加入了连接包,找了很久没找到解决方案,不太明白