Programatically creating @Client HttpClients that are included in HttpFilters #5150
-
My application registers or deregisters new endpoints from it as they are discovered or dropped, and as such I'm using a map of HttpClient objects to hold and update the client details. This is working using the basic Is there a better way to programatically instantiate |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I stumbled on the answer to this 5 minutes after posting, it was a load easier than I thought and just entails adding the instance to the context instead of anything more complicated like I thought it would be...doh.
|
Beta Was this translation helpful? Give feedback.
I stumbled on the answer to this 5 minutes after posting, it was a load easier than I thought and just entails adding the instance to the context instead of anything more complicated like I thought it would be...doh.
HttpClient client = applicationContext.createBean(HttpClient.class, myUrl)