zuul-ratelimit2.2.3配置问题

##版本:
spring-cloud-zuul-ratelimit-2.2.3.RELEASE
springboot2.0.4
##yml配置:

ratelimit:
    enabled: true  
    repository: REDIS
    policy-list:
      log:
        - limit: 1000000
          refresh-interval: 60
          type:
            - origin

##用idea启动时,一直提示,项目起不来,在eclipse中就没有这个问题,打包放到服务器中运行也没有问题:

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securedRateLimitUtils' defined in class path resource [com/marcosbarbero/cloud/autoconfigure/zuul/ratelimit/RateLimitAutoConfiguration$RateLimitUtilsConfiguration.class]: Unsatisfied dependency expressed through method 'securedRateLimitUtils' parameter 0; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'zuul.ratelimit-com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.config.properties.RateLimitProperties': Could not bind properties to 'RateLimitProperties' : prefix=zuul.ratelimit, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'zuul.ratelimit.policy-list.log[0].type[0]' to com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.config.properties.RateLimitProperties$Policy$MatchType sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 java.lang.Thread.run(Thread.java:745)
Disconnected from the target VM, address: '127.0.0.1:62167', transport: 'socket'

Process finished with exit code 1
查看全部
xhq6288038
xhq6288038
2019/11/30 09:35
  • spring
  • java
  • 点赞
  • 收藏
  • 回答
    私信

1个回复