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

DefaultImplementationLookupConfiguration class should use Introspector.decapitalize(…) to generate the bean name [DATACMNS-1439] #1869

spring-projects-issues opened this issue Dec 6, 2018 · 1 comment
in: repository type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Dec 6, 2018

kchobantonov opened DATACMNS-1439 and commented

When switching from 4.x version to 5.x spring framework with the latest spring data we have noticed that one of our custom repository bean implementation was not picked up.

The reason for that is because the @Repository annotation did not specify explicitly the bean name which then delegates the bean name creation to the bean name generator. Bean generator is using Introspector.decapitalize method.
In our case our bean class name is UDPDefinitionRepositoryImpl (e.g. the second char is uppercase) which will define the bean with the name - UDPDefinitionRepositoryImpl.

But then the repository implementation lookup will use the bean name uDPDefinitionRepositoryImpl - which of course is not there - as a work around for now we can explicitly specify the respository bean name using @Repository("uDPDefinitionRepositoryImpl")

Affects: 2.1.3 (Lovelace SR3)

Issue Links:

  • DATAJPA-1437 Property Reference Exception if custom repository implementation not in sub-package of the declared custom interface
    ("is duplicated by")

Referenced from: pull request #325

Copy link

@spring-projects-issues spring-projects-issues commented Dec 7, 2018

Mark Paluch commented

I polished the description for readability. A single sentence going over 8 lines with almost 1000 chars is otherwise hard to comprehend. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: repository type: enhancement
None yet

No branches or pull requests

2 participants