12. コンポーネント登録を行う
Moduleクラス
12
public class SolrIndexModule extends AbstractModule {
@Override
protected void configure() {
this.bind(RegisterSolrDateType.class)
.asEagerSingleton();
}
}
13. @Injectを付けたコンストラクタで他コンポーネン
トを取得可能
各種コンポーネント
13
public class RegisterSolrDateType extends
AbstractIndexComponent {
@Inject
public RegisterSolrDateType(final Index index,
@IndexSettings final Settings indexSettings,
final MapperService mapperService) {
super(index, indexSettings);
…略…
}
}