When updating to springboot3.1.1, I can not import ...ElasticSearchRestHealthContributorAutoConfiguration;

136 views Asked by At

When updating to springbootfrom 2 to 3.1.1, I can not import org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticSearchRestHealthContributorAutoConfiguration.

https://docs.spring.io/spring-boot/docs/3.1.1/api/org/springframework/boot/actuate/autoconfigure/elasticsearch/ElasticsearchRestHealthContributorAutoConfiguration.html#%3Cinit%3E() But when I check the spring doc, it looks like the class is still here. Not sure how I can fix it.

1

There are 1 answers

0
Vadim Yemelyanov On

You have an error in your import statement.

use this one Instead

import org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticsearchRestHealthContributorAutoConfiguration

enter image description here