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

ReactiveElasticsearchRepositoriesAutoConfiguration should back off when Reactor is not on the classpath #41672

Closed
mitu2 opened this issue Aug 1, 2024 · 0 comments
Labels
type: bug A general bug
Milestone

Comments

@mitu2
Copy link

mitu2 commented Aug 1, 2024

Original Problem Address

spring-projects/spring-data-elasticsearch#2940

problem description

I didn't use @EnableReactiveElasticsearchRepositories, But it seems to scan my code and throw out some info messages.I wonder why it works, and it generates a message every time I add a JPA repository.

2024-07-13T19:43:33.338+08:00  INFO 4648 --- [spring-data-example] [  restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Reactive Elasticsearch - Could not safely identify store assignment for repository candidate interface org.example.springdataexample.repositories.jdbc.ItemRepository; If you want this repository to be a Reactive Elasticsearch repository, consider annotating your entities with one of these annotations: org.springframework.data.elasticsearch.annotations.Document (preferred), or consider extending one of the following types with your repository: org.springframework.data.elasticsearch.repository.ReactiveElasticsearchRepository
2024-07-13T19:43:33.338+08:00  INFO 4648 --- [spring-data-example] [  restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Reactive Elasticsearch - Could not safely identify store assignment for repository candidate interface org.example.springdataexample.repositories.jdbc.PersonRepository; If you want this repository to be a Reactive Elasticsearch repository, consider annotating your entities with one of these annotations: org.springframework.data.elasticsearch.annotations.Document (preferred), or consider extending one of the following types with your repository: org.springframework.data.elasticsearch.repository.ReactiveElasticsearchRepository

I found that ReactiveElasticsearchRepositoriesAutoConfiguration triggers at the same time as ElasticsearchRepositoriesAutoConfiguration, and now I can only exclude one startup class to avoid it scanning my code with another

- @SpringBootApplication
+ @SpringBootApplication(exclude = ReactiveElasticsearchRepositoriesAutoConfiguration.class)
public class SpringDataExampleApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringDataExampleApplication.class, args);
    }

}

Is there a better way to avoid this?

example code

I told you about my example code uploaded to

https://github.com/mitu2/spring-data-example

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 1, 2024
@wilkinsona wilkinsona changed the title Problem Mirror: Questions about using Spring Data Jpa and Spring Data Elasticsearch console information ReactiveElasticsearchRepositoriesAutoConfiguration should back off when Reactor is not on the classpath Aug 1, 2024
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 1, 2024
@wilkinsona wilkinsona added this to the 3.2.x milestone Aug 1, 2024
@wilkinsona wilkinsona modified the milestones: 3.2.x, 3.2.9 Aug 1, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants