小编Amr*_*rut的帖子

在Spring-Boot应用程序中使用application.yaml配置hystrix命令属性

我有同样的问题,我试图覆盖application.yaml中的hystrix属性.当我运行应用程序并使用localhost:port/app-context/hystrix.stream检查属性时,我得到所有默认值.

这是我的application.yaml中的hystrix配置

hystrix:
   command.StoreSubmission.execution.isolation.thread.timeoutInMilliseconds: 30000
   command.StoreSubmission.circuitBreaker.requestVolumeThreshold: 4
   command.StoreSubmission.circuitBreaker.sleepWindowInMilliseconds: 60000
   command.StoreSubmission.metrics.rollingStats.timeInMilliseconds: 180000
   collapser.StoreSubmission.maxRequestsInBatch: 1
   collapser.StoreSubmission.requestCache.enabled: FALSE
   threadpool.StoreSubmission.coreSize: 30
   threadpool.StoreSubmission.metrics.rollingStats.timeInMilliseconds: 180000
Run Code Online (Sandbox Code Playgroud)

这是我在浏览网址时看到的 - localhost:port/app-context/hystrix.stream [这是用于hystrix仪表板的相同流网址] -

data: {"type":"HystrixCommand","name":"storeSubmission","group":"StoreSubmission","currentTime":1435941064801,"isCircuitBreakerOpen":false,"errorPercentage":0,"errorCount":0,"requestCount":0,"rollingCountCollapsedRequests":0,"rollingCountExceptionsThrown":0,"rollingCountFailure":0,"rollingCountFallbackFailure":0,"rollingCountFallbackRejection":0,"rollingCountFallbackSuccess":0,"rollingCountResponsesFromCache":0,"rollingCountSemaphoreRejected":0,"rollingCountShortCircuited":0,"rollingCountSuccess":0,"rollingCountThreadPoolRejected":0,"rollingCountTimeout":0,"currentConcurrentExecutionCount":0,"latencyExecute_mean":0,"latencyExecute":{"0":0,"25":0,"50":0,"75":0,"90":0,"95":0,"99":0,"99.5":0,"100":0},"latencyTotal_mean":0,"latencyTotal":{"0":0,"25":0,"50":0,"75":0,"90":0,"95":0,"99":0,"99.5":0,"100":0},"propertyValue_circuitBreakerRequestVolumeThreshold":20,"propertyValue_circuitBreakerSleepWindowInMilliseconds":5000,"propertyValue_circuitBreakerErrorThresholdPercentage":50,"propertyValue_circuitBreakerForceOpen":false,"propertyValue_circuitBreakerForceClosed":false,"propertyValue_circuitBreakerEnabled":true,"propertyValue_executionIsolationStrategy":"THREAD","propertyValue_executionIsolationThreadTimeoutInMilliseconds":1000,"propertyValue_executionIsolationThreadInterruptOnTimeout":true,"propertyValue_executionIsolationThreadPoolKeyOverride":null,"propertyValue_executionIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"propertyValue_requestCacheEnabled":true,"propertyValue_requestLogEnabled":true,"reportingHosts":1}

data: {"type":"HystrixThreadPool","name":"StoreSubmission","currentTime":1435941064801,"currentActiveCount":0,"currentCompletedTaskCount":35,"currentCorePoolSize":30,"currentLargestPoolSize":30,"currentMaximumPoolSize":30,"currentPoolSize":30,"currentQueueSize":0,"currentTaskCount":35,"rollingCountThreadsExecuted":0,"rollingMaxActiveThreads":0,"propertyValue_queueSizeRejectionThreshold":5,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":180000,"reportingHosts":1}
Run Code Online (Sandbox Code Playgroud)

问题在于hystrix命令和collapser属性,其中正确设置了线程池属性.我的@configuration类中有以下注释-

@EnableAutoConfiguration(exclude=MongoAutoConfiguration.class)
@EnableHystrix
@EnableHystrixDashboard
Run Code Online (Sandbox Code Playgroud)

有人尝试在Spring-Boot应用程序中使用application.yaml配置hystrix命令属性,可以帮忙吗?

spring-boot hystrix spring-cloud

17
推荐指数
1
解决办法
3万
查看次数

Spring Cloud Config Encryption API 忽略末尾的特殊字符

我们已经使用 Spring 云配置外部化了我们的应用程序配置。我们还使用加密 API 在纯文本密码进入 yaml 属性文件之前对其进行加密。

我正在努力为下游系统加密密码,该密码最后具有特殊字符。不知何故,云配置加密 API 忽略了这一点。当您使用解密 API 解密密码时,您会得到纯文本,最后没有特殊字符。

我正在使用 curl 来调用 API -

curl 10.102.82.1:11901/encrypt -d AXIzFDH4XZA=  
Run Code Online (Sandbox Code Playgroud)

出于某种原因,纯文本中间的特殊字符可以正常工作,但是如果最后有它,那么它会被忽略。可能这个密码已经被散列了,但我仍然很想知道如何处理这个问题。

java encryption spring spring-cloud

5
推荐指数
2
解决办法
1890
查看次数

Deploying two Spring batch applications in same cluster in a single Weblogic Domain?

BackGround -

I am trying to deploy two spring batch applications as .war in same cluster in a single Weblogic Domain & each of them have spring batch admin console configured in servlet.xml like below -

<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

  <!-- Spring Batch Admin -->  
  <import resource="classpath*:/org/springframework/batch/admin/web/resources/servlet-config.xml"/>
  <import resource="classpath*:/org/springframework/batch/admin/web/resources/webapp-config.xml"/>

  <bean id="resourceService" class="org.springframework.batch.admin.web.resources.DefaultResourceService">
    <property name="servletPath" value="/batch" />
  </bean>  

</beans>
Run Code Online (Sandbox Code Playgroud)

Its a maven project & spring-batch-admin-manager 1.2.2 is pulled in as dependency.

Problem -
I am struggling …

java weblogic spring-batch spring-batch-admin

1
推荐指数
1
解决办法
4332
查看次数