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

Is multiples repositories allowed ? [Junit4] #269

Open
tanguc opened this issue Oct 29, 2019 · 1 comment
Open

Is multiples repositories allowed ? [Junit4] #269

tanguc opened this issue Oct 29, 2019 · 1 comment

Comments

@tanguc
Copy link

tanguc commented Oct 29, 2019

Expected Behavior

Able to create multiples repositories where each of them represents a table

Actual Behavior

Only one repository is created instead of N

Steps to Reproduce the Problem

1.Create two repositories in the same package
1.EnableDynamodbScan on the package
1.Run

Specifications

11:29:49.000 [Test worker] INFO DynamoDBRepositoryFactory - Spring Data DynamoDB Version: 5.1.0 (2.1)
11:29:49.000 [Test worker] INFO DynamoDBRepositoryFactory - Spring Data Version: 2.1.10.RELEASE
11:29:49.000 [Test worker] INFO DynamoDBRepositoryFactory - AWS SDK Version: 1.11.600
11:29:49.000 [Test worker] INFO DynamoDBRepositoryFactory - Java Version: 1.8.0_222 - OpenJDK 64-Bit Server VM 25.222-b10
11:29:49.000 [Test worker] INFO DynamoDBRepositoryFactory - Platform Details: Linux 5.0.0-32-generic

Details:
When I'm trying to create multiple repositories with each of them have their unique model entities I'm getting only one table created.
After analysis the bean definitions is triggered by the beanRepositoryRegistrar(SpringBoot) however in the Entity2DynamoDBTAblesSynchronizer only one is detected in the registered entities:
In the log:
Checking repository classes with DynamoDB tables Session for ContextRefreshedEvent
I'm using Junit4

@tanguc tanguc changed the title Is multiples repositories allowed ? Is multiples repositories allowed ? [Junit4] Oct 29, 2019
@GabrielOancea
Copy link

Similar and related issue: I have 2 DynamoDB tables that I need to access from the same application. I have two entity classes and two repository classes. It builds OK, but when I try to run I get a bean error from Spring Boot:
"The bean 'dynamoDB-DynamoDBMapperConfig' could not be registered. A bean with that name has already been defined and overriding is disabled."
The only solution was to allow bean overriding.

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

No branches or pull requests

2 participants