SpringBoot 1.4でJest 0.0.6 ElasticSearchクライアントを使用しようとしていて、次のエラーがあります。私はSpringBootがJest Clientをヘルスチェックとともに自動的に作成しようとしているのだが、古いJestクライアントには必要なクラスがいくつかあるからだと思う。Springboot 1.4 + Jest 0.0.6
どのようにすればいいですか?
この時点でアップグレードするオプションがない古いElasticSearch v0.90.5サーバーに接続する必要があります。 SpringBooの古いバージョンに接続するには、どのように最善の方法をとっているかについてのアイデアがあれば、それも非常に役に立ちます。
「冗談サポート
は春ブーツが自動設定さJestClientと専用HealthIndicator冗談はクラスパス上にある場合、これはあなたがすることができます。春ブーツ1.4リリースノートから
Caused by:org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'metricsEndpointMetricReader' defined in class path resource
...
[org/springframework/boot/actuate/autoconfigure/ElasticsearchHealthIndicatorConfiguration$ElasticsearchJestHealthIndicatorConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthIndicator]:
Factory method 'elasticsearchHealthIndicator' threw exception; nested exception is java.lang.NoClassDefFoundError: io/searchbox/action/Action; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration ': Bean instantiation via constructor failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration$$EnhancerBySpringCGLIB$$909d8b5d]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'elasticsearchHealthIndicator' defined in class path resource [org/springframework/boot/actuate/autoconfigure/ElasticsearchHealthIndicatorConfiguration$ElasticsearchJestHealthIndicatorConfiguration.class]: Bean instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthIndicator]: Factory method 'elasticsearchHealthIndicator' threw exception; nested exception is java.lang.NoClassDefFoundError: io/searchbox/action/Action
spring-data-elasticsearchがclasspathにない場合でもElasticsearchを使用してください。
pomまたはgradleビルドファイルにアクチュエータの依存関係を含めてください。このリンクhttp://start.spring.ioでアプリケーションをブートストラップすることをお勧めします。 –
この変更の前にアクチュエータは正常に動作していましたが、欠席しているクラスはJestライブラリからのものです。 – chrismacp