Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring boot ElasticsearchRestClientAutoConfiguration is shaded by ElasticsearchEvolutionAutoConfiguration #29

Closed
ivan-bezyazychnyy opened this issue Mar 9, 2021 · 4 comments · Fixed by #30
Assignees
Labels
bug Something isn't working

Comments

@ivan-bezyazychnyy
Copy link

As I can see the spring boot's ElasticsearchRestClientAutoConfiguration might happen after ElasticsearchEvolutionAutoConfiguration.
I see that ElasticsearchEvolutionAutoConfiguration contains the code:

@AutoConfigureAfter(name = {
        "org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientAutoConfiguration" // since spring-boot 2.1
})

But I do not see the org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientAutoConfiguration and I see org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration in spring boot 2.4.3. May be it was replaced?
As a result the RestHighLevelClient is configured by elasticsearch-evolution and some configuration parameters like spring.elasticsearch.rest.username are not supported.
I suggest to add extra line into @AutoConfigureAfter.

@xtermi2 xtermi2 self-assigned this Mar 9, 2021
@xtermi2 xtermi2 added the bug Something isn't working label Mar 9, 2021
@xtermi2
Copy link
Collaborator

xtermi2 commented Mar 9, 2021

Yes, you are totally right. It should look like this:

@AutoConfigureAfter(name = {
        "org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientAutoConfiguration", // spring-boot 2.1 / 2.2
        "org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration" // spring-boot 2.3+
})

Will be fixed soon ;)

xtermi2 added a commit that referenced this issue Mar 9, 2021
xtermi2 added a commit that referenced this issue Mar 9, 2021
@ivan-bezyazychnyy
Copy link
Author

@xtermi2 Thanks for the fast fix! Could you please say when to expect the next release with this fix? It would be great to understand it so we can decide to wait for it or we will have to make our own build.

xtermi2 added a commit that referenced this issue Mar 11, 2021
…er_for_spring-boot_2.3+

fixes issue #29: AutoConfigureAfter ElasticsearchRestClientAutoConfiguration (moved in spring-boot 2.3)
@xtermi2
Copy link
Collaborator

xtermi2 commented Mar 11, 2021

@ivan-bezyazychnyy The release 0.3.1 will be out in the next couple of hours 🚀

@ivan-bezyazychnyy
Copy link
Author

@xtermi2 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants