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

Multi-store support reports Could not safely identify store assignment #3179

Open
caolian2003 opened this issue Oct 15, 2024 · 2 comments
Open
Labels
type: enhancement A general enhancement

Comments

@caolian2003
Copy link

caolian2003 commented Oct 15, 2024

2024-10-15T19:40:08.435+09:00  INFO 11388 --- [  restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.avengers.yoribogo.recipe.repository.RecommendedMenuRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository

Spring Data JPA - Could not safely identify store assignment for repository candidate interface com.avengers.yoribogo.notification.weeklypopularrecipe.repository.WeeklyPopularRecipeMongoRepository; If you want this repository to be a JPA repository, consider annotating your entities with one of these annotations: jakarta.persistence.Entity, jakarta.persistence.MappedSuperclass (preferred), or consider extending one of the following types with your repository: org.springframework.data.jpa.repository.JpaRepository

Spring Data MongoDB - Could not safely identify store assignment for repository candidate interface com.avengers.yoribogo.recipe.repository.RecommendedMenuRepository; If you want this repository to be a MongoDB repository, consider annotating your entities with one of these annotations: org.springframework.data.mongodb.core.mapping.Document (preferred), or consider extending one of the following types with your repository: org.springframework.data.mongodb.repository.MongoRepository

There was a problem with the method I created to test the like function.
This error is a warning message that did not occur before adding the Insert feature for Mongodb to one transaction.
In addition, the functional test also passed as postman.
However, after creating an event processing feature to insert data into Mongodb, such a warning statement occurs.
Even though there is a warning, the api still works fine.
But I don't think that problem has been fundamentally solved.
Entities and Document Annotations are appropriately specified in the class
I don't think this is enough.
Please let me know the cause and solution of this problem

below : my Project File
yoribogo.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 15, 2024
@mp911de mp911de changed the title Spring Data MongoDB - Could not safely identify store assignment Multi-storee support reports Could not safely identify store assignment Oct 17, 2024
@mp911de mp911de transferred this issue from spring-projects/spring-data-jpa Oct 17, 2024
@mp911de mp911de changed the title Multi-storee support reports Could not safely identify store assignment Multi-store support reports Could not safely identify store assignment Oct 17, 2024
@mp911de
Copy link
Member

mp911de commented Oct 17, 2024

First of all, the issue report has a terrible formatting that makes it almost impossible to read. While I appreciate that there is a reproducer, it contains all of your application instead of the necessary bits to reproduce the issue which makes it again hard to reproduce, in addition this is just a chunk instead of the full project.

You have a point that in a multi-store arrangement, there are multiple messages from modules that report they cannot implement a repository and that can be annoying. For the time being, please specify base packages with your @Enable…Repositories annotation.

@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 21, 2024
@mp911de
Copy link
Member

mp911de commented Oct 21, 2024

Alternatively, set the logging level to off for the affected classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants