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

Introduce PropertiesBasedNamedQueriesFactoryBean to reduce bean indirections #2596

Closed
wants to merge 4 commits into from

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Apr 6, 2022

We now provide PropertiesBasedNamedQueriesFactoryBean to create PropertiesBasedNamedQueries directly bypassing indirections through PropertiesFactoryBean and PropertiesBasedNamedQueries.

Closes #2584

@mp911de mp911de added the type: enhancement A general enhancement label Apr 6, 2022
mp911de and others added 3 commits June 7, 2022 14:35
…ections.

We now provide PropertiesBasedNamedQueriesFactoryBean to create PropertiesBasedNamedQueries directly bypassing indirections through PropertiesFactoryBean and PropertiesBasedNamedQueries.
We now expose RepositoryFragments as a top level bean to be referenced when creating the actual repository.
@@ -128,8 +131,9 @@ public BeanDefinitionBuilder build(RepositoryConfiguration<?> configuration) {

fragmentsBuilder.addConstructorArgValue(fragmentBeanNames);

builder.addPropertyValue("repositoryFragments",
ParsingUtils.getSourceBeanDefinition(fragmentsBuilder, configuration.getSource()));
String fragmentsBeanName = BeanDefinitionReaderUtils.uniqueBeanName(extension.getModuleName().toLowerCase(Locale.ROOT) + ".repo-fragments", registry);
Copy link
Member Author

Choose a reason for hiding this comment

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

It would make sense to include the repository name for easier correlation as the fragments are correlated to an individual repository.

christophstrobl pushed a commit that referenced this pull request Jun 13, 2022
…ections.

We now provide PropertiesBasedNamedQueriesFactoryBean to create PropertiesBasedNamedQueries directly bypassing indirections through PropertiesFactoryBean and PropertiesBasedNamedQueries.

Resolves: #2584
Original Pull Request: #2596
christophstrobl added a commit that referenced this pull request Jun 13, 2022
We now expose RepositoryFragments as a bean to be referenced when creating the actual repository.

Original Pull Request: #2596
@christophstrobl christophstrobl deleted the issue/2584 branch June 13, 2022 09:06
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

Successfully merging this pull request may close these issues.

Refine inner beans arrangement
2 participants