1.
问题springboot 配置msql ,启动报错。
server.port=7000
spring.application.name=leyou-stock
eureka.client.service-url.defaultZone=http://localhost:9000/eureka/
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/code1_2?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
spring.datasource.data-username=root
spring.datasource.data-password=root
#redis 数据编号
spring.redis.database=0
#redis 服务器ip
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=leyou
#redis请求超时时间,超过此值redis自动断开连接
spring.redis.timeout=10000ms
#jedis最大连接数,超过此值则提示获取不到连接异常
spring.redis.jedis.pool.max-active=32
#jedis最大等待时间,超过此值会提示连接超时异常
spring.redis.jedis.pool.max-wait=10000ms
#jedis最大等待连接数
spring.redis.jedis.pool.max-idle=32
#jedis最小等待连接数
spring.redis.jedis.pool.min-idle=0
2.报错信息:
3. 错误原因:
spring.datasource.data-username=root
spring.datasource.data-password=root
改成:
spring.datasource.username=root
spring.datasource.password=root