【发布时间】:2011-03-15 06:59:03
【问题描述】:
我使用ektorp 连接到 CouchDB。
构建 ektorp HttpClient 实例的方法是使用构建器模式:
HttpClient httpClient = new StdHttpClient.Builder()
.host("mychouchdbhost")
.port(4455)
.build();
我对 Spring 比较陌生。请告诉我如何在我的上下文中配置HttpClient 以通过Builder 创建它。
一种方法是使用@Configuration。还有其他选择吗?
【问题讨论】:
标签: java spring dependency-injection inversion-of-control builder