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
本文档解决了Nacos配置中出现的多个主从数据库问题,提供了正确的配置示例,包括Spring Redis和Mybatis的详细配置信息,以及Swagger的相关设置。通过删除冗余数据库配置,确保了系统的正常运行。
1万+

被折叠的 条评论
为什么被折叠?



