Skip to content

Conversation

@schauder
Copy link
Contributor

Adds the @EnableJdbcRepositories annotation, which when used on a Spring configuration enables scanning packages for JDBC-repositories.

Issue: https://jira.spring.io/browse/DATAJDBC-100

schauder added 2 commits June 19, 2017 15:06
Adds the @EnableJdbcRepositories annotation, which when used on a Spring configuration enables scanning packages for JDBC-repositories.

private NamedParameterJdbcOperations findOrCreateJdbcOperations() {

return getNamedParameterJdbcOperations() //
Copy link
Member

Choose a reason for hiding this comment

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

Remove nesting by using Optionals.firstNonEmpty(…)-

}

private Optional<NamedParameterJdbcOperations> getNamedParameterJdbcOperations() {
return getBean(NamedParameterJdbcOperations.class, "namedParameterJdbcOperations");
Copy link
Member

Choose a reason for hiding this comment

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

Names as constants. Align with Boot defaults, i.e. Operations -> Template. Types should stay with Operations.

/*
* (non-Javadoc
* @see * @see org.springframework.data.repository.config
.RepositoryConfigurationExtensionSupport#getRepositoryFactoryBeanClassName()
Copy link
Member

Choose a reason for hiding this comment

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

Weird line break.

Changed bean names to those used by Boot.

Extracted constants for bean names (in the production classes and test classes separately). Renamed an existing constant to avoid confusion.

Fixed some garbled non-javadoc comments.
odrotbohm pushed a commit that referenced this pull request Jun 20, 2017
Adds the @EnableJdbcRepositories annotation, which when used on a Spring configuration enables scanning packages for JDBC repositories.

Original pull request: #6.
@odrotbohm
Copy link
Member

That's merged.

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

Successfully merging this pull request may close these issues.

3 participants