You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The trouble with allowing clients to provide their own RestTemplate is that there's a certain minimum configuration they'll need to make: as written, Bowman needs an Apache HttpClient ClientHttpRequestFactory (or one that behaves similarly); we need a Jackson ObjectMapper configured with all the right modules (which then have a dependency back on the RestTemplate, to support the dynamic link-traversal proxying); we need the JSON+HAL accept headers added to its requests via an interceptor.
This configuration is sufficiently annoying that I figured it would be easier if Bowman sets up the RestTemplate and then allows clients to customise it afterwards with a RestTemplateConfigurer.
I appreciate this would be annoying when you already have a RestTemplate you want to use; however, the inelegance of adding all the Bowman-specific configuration to your RestTemplate will likely dwarf the inelegance of adding your Authorization header to the Bowman configuration.
As well as this, OAuth2RestTemplate and the rest of spring-security-oauth are in maintenance mode so I don't think we should go out of our way to provide bespoke support for it.
Hi!, it might be nice some way to provide the restTemplate instead of the configurer.
I see there is a factory but didn't find a way to set it ?
I think I can workaround with something like this:
But probably more elegant just to be able to provide the factory, or the rest template it self. Don't you guys think ?
The text was updated successfully, but these errors were encountered: