-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Labels
type: bugA general bugA general bug
Milestone
Description
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
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug