sentinel持久化spring.cloud.sentinel.datasource.dsl.nacos.rule-type一直报错的问题,已解决

Failed to bind properties under 'spring.cloud.sentinel.datasource.dsl.nacos.rule-type' to com.alibaba.cloud.sentinel.datasource.RuleType:

Property: spring.cloud.sentinel.datasource.dsl.nacos.rule-type
Value: flow
Origin: class path resource [application.yml]:24:26
Reason: 2

Action:

Update your application's configuration
出现了上面的错误,我计划将sentinel配置规则添加到nacos中,一直说那个问题.
下面是关于我的yml文件
#yml配置
server:
  port: 8401
spring:
  application:
    name: cloudalibaba-sentinel-service
  cloud:
    nacos:
      discovery:
        # Nacos服务注册中心地址
        server-addr: localhost:8848
    sentinel:
      transport:
        # sentinel dashboard 地址
        dashboard: localhost:8080
        # 默认为8719,如果被占用会自动+1,直到找到为止
        port: 8719
      # 流控规则持久化到nacos
      datasource:
        dsl:
          nacos:
            server-addr: localhost:8848
            data-id: nacos-consumer-order
            group-id: DEFAULT_GROUP
            data-type: json
            rule-type: flow

management:
  endpoints:
    web:
      exposure:
        include: "*"

已解决:
jdk版本的问题,希望遇到此类问题可以看看版本,

你可能感兴趣的:(微服务)