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
DATAJDBC-395 - AbstractJdbcConfiguration no longer registers a bean of type DataAccessStrategy. #160
Conversation
…f type DataAccessStrategy. This avoids having multiple beans of that type in an ApplicationContext when a custom DataAccessStrategy needs to be provided.
ObjectProvider<RelationResolver> relationResolverProvider, Optional<NamingStrategy> namingStrategy, | ||
JdbcConverter jdbcConverter) { | ||
|
||
RelationResolver relationResolver = relationResolverProvider.getIfAvailable(() -> dataAccessStrategy( // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try to avoid these manual breaks in parameters lists? If a list exceeds the line length, we could rather prefer breaking right before the invocation instead:
relationResolverProvider //
.getIfAvailable(() -> …)
|
||
return new JdbcAggregateTemplate(publisher, context, converter, dataAccessStrategy); | ||
return new JdbcAggregateTemplate( // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. I think the single line reads way better than the ones broken out onto multiple ones.
JdbcMappingContext context = jdbcMappingContext(namingStrategy); | ||
return new DefaultDataAccessStrategy(new SqlGeneratorSource(context), context, jdbcConverter, operations); | ||
defaultDataAccessStrategy = new DefaultDataAccessStrategy( // | ||
new SqlGeneratorSource(context), // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extract into a local variable to keep the line shorter and avoid the additional manual breaks.
Avoid line breaks in parameter lists.
…f type DataAccessStrategy. This avoids having multiple beans of that type in an ApplicationContext when a custom DataAccessStrategy needs to be provided. Original pull request: #160.
Avoid line breaks in parameter lists. Original pull request: #160.
This avoids having multiple beans of that type in an ApplicationContext when a custom DataAccessStrategy needs to be provided.