Skip to content

DATAJDBC-267 - Fix Jdbc configuration to support multiple stores #89

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jdbc</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<version>1.0.0.DATAJDBC-267-SNAPSHOT</version>

<name>Spring Data JDBC</name>
<description>Spring Data module for JDBC repositories.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,30 @@
* @author Greg Turnquist
* @author Jens Schauder
* @author Mark Paluch
* @author Michael Simons
*/
@Configuration
public class JdbcConfiguration {

@Bean
protected RelationalMappingContext jdbcMappingContext(Optional<NamingStrategy> namingStrategy,
CustomConversions customConversions) {
protected RelationalMappingContext jdbcMappingContext(Optional<NamingStrategy> namingStrategy) {

RelationalMappingContext mappingContext = new RelationalMappingContext(
namingStrategy.orElse(NamingStrategy.INSTANCE));
mappingContext.setSimpleTypeHolder(customConversions.getSimpleTypeHolder());
mappingContext.setSimpleTypeHolder(jdbcCustomConversions().getSimpleTypeHolder());

return mappingContext;
}

@Bean
protected RelationalConverter relationalConverter(RelationalMappingContext mappingContext,
CustomConversions customConversions) {
return new BasicRelationalConverter(mappingContext, customConversions);
protected RelationalConverter relationalConverter(RelationalMappingContext mappingContext) {
return new BasicRelationalConverter(mappingContext, jdbcCustomConversions());
}

/**
* Register custom {@link Converter}s in a {@link CustomConversions} object if required. These
* {@link CustomConversions} will be registered with the
* {@link #relationalConverter(RelationalMappingContext, CustomConversions)}. Returns an empty
* {@link #relationalConverter(RelationalMappingContext)}. Returns an empty
* {@link JdbcCustomConversions} instance by default.
*
* @return must not be {@literal null}.
Expand Down