若依启动项目报错:Failed to configure a DataSource: ‘url‘ attribute is not specified...
nacos 数据库配置有误,有多个主从数据库,删掉就好。正确配置如下:# spring配置spring:redis:host: 114.11.XX.XXport: 3306password: 123456datasource:driver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://127.0.0.1:3306/test?useUni
·
nacos 数据库配置有误,有多个主从数据库,删掉就好。
正确配置如下:
# spring配置
spring:
redis:
host: 114.11.XX.XX
port: 3306
password: 123456
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 123456
# mybatis配置
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.ruoyi.job.domain
# 配置mapper的扫描,找到所有的mapper.xml映射文件
mapperLocations: classpath:mapper/**/*.xml
# swagger配置
swagger:
title: 定时任务接口文档
license: Powered By ruoyi
licenseUrl: https://ruoyi.vip
更多推荐
已为社区贡献6条内容
所有评论(0)