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

[#2514] Fix naming of registered Repository and AggregateFactory beans #2525

Merged
merged 3 commits into from Dec 20, 2022

Conversation

smcvb
Copy link
Member

@smcvb smcvb commented Dec 19, 2022

With the recent switch to a newer Spring integration, the naming of the Repository and AggregateFactory beans.
More specifically, the fully qualified class name of the @Aggregate annotated class, combined with "Repository" and "AggregateFactory" was the bean.
Instead, as in pre-AxonFramework-4.6, the name should be the simple name of the @Aggregate annotated class, combined with "Repository" and "AggregateFactory" was the bean.
This pull request rectifies this, by registering the Repository and AggregateFactory beans through the aforementioned naming scheme.

Doing so, this pull request resolves #2514.

Fix naming of Repository bean name, by using a lower cased initial
letter for the aggregate type. Furthermore, fix this for the
AggregateFactory bean too, as it adhered to the same adjusted, and
faulty, naming behavior.

#2514
@smcvb smcvb added Type: Bug Use to signal issues that describe a bug within the system. Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: In Progress Use to signal this issue is actively worked on. labels Dec 19, 2022
@smcvb smcvb added this to the Release 4.6.3 milestone Dec 19, 2022
@smcvb smcvb requested a review from a team December 19, 2022 15:54
@smcvb smcvb self-assigned this Dec 19, 2022
@smcvb smcvb requested review from gklijs and CodeDrivenMitch and removed request for a team December 19, 2022 15:54
Fine tune test case to clearly state the wrong bean name, by extracting
all bean names for the Repository class.

#2514
Copy link
Member

@CodeDrivenMitch CodeDrivenMitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

The AggregateStereotypeAutoConfigurationTest wrongfully expects the bean
 name to be the full @aggregate annotated class name for the Repository.
Next to fixing this, resolves some warnings in this file while we're at
it, like forcing the identifier to be an Object to *not* use the
deprecated VersionedAggregateIdentifier constructor.

#2514
@sonarcloud
Copy link

sonarcloud bot commented Dec 19, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

62.5% 62.5% Coverage
0.0% 0.0% Duplication

@smcvb smcvb merged commit 98dbf67 into axon-4.6.x Dec 20, 2022
@smcvb smcvb deleted the bug/2514 branch December 20, 2022 08:57
@smcvb smcvb added Status: Resolved Use to signal that work on this issue is done. and removed Status: In Progress Use to signal this issue is actively worked on. labels Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: Resolved Use to signal that work on this issue is done. Type: Bug Use to signal issues that describe a bug within the system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants