2017-03-09 188 views
1

我在写一个custome Health Indicator来检查与另一个应用程序的连接。然而,为了检查这一点,我需要/ health端点的请求URL中的一些请求参数(例如,我想要的URL是“/ health?countryCode = IN”) 有没有办法实现这一点? 谢谢。有没有办法将请求参数传递给/ health端点?

回答

0

刚刚拿到请求注入,如:

public class CustomHealthIndicator{ 

@Autowire 
HttpServletRequest request; 
.... 
} 
+0

感谢@stefan ..它的工作。 – Mahendra

+0

只是提到错字,它是 org.springframework.beans.factory.annotation.Autowired –

相关问题