I use ektorp to connect to CouchDB.
The way to build an ektorp HttpClient instance is to use builder pattern:
HttpClient httpClient = n
While FactoryBean is cleaner there is a more quick-n-dirty method, using SpEL.
This is how I've just configured the Neo4j driver:
As you can see from the factory method's 3rd parameter, you can invoke a builder and its methods as a SpEL expression, with the nuance that classes have to be specified via their FQN. But that avoids you to write an entire boilerplate FactoryBean.