使用Spring Cloud Netflix时覆盖Hystrix属性

vir*_*m03 2 spring spring-boot hystrix spring-cloud

我有一个Spring Boot应用程序,通过Spring Cloud库使用Netflix Hystrix,一切正常.

我想覆盖Hystrix的一些基本属性,例如hystrix.threadpool.default.coreSize和/或hystrix.threadpool.default.maxQueueSize.不幸的是,我找不到一些开箱即用的Spring Boot属性来执行此操作,那么在应用程序启动时我需要做些什么才能设置这些属性?

如何在spring-cloud-starter-hystrix模块中设置这些属性?

M. *_*num 6

只需将这些属性添加到application.properties文件即可.

hystrix.threadpool.default.coreSize=
hystrix.threadpool.default.maxQueueSize=
Run Code Online (Sandbox Code Playgroud)