Skip to content

Commit bf81c72

Browse files
committed
DATAJDBC-267 - Polishing.
Add author tags. Extend Javadoc. Original pull request: #89.
1 parent 234a17d commit bf81c72

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

src/main/java/org/springframework/data/jdbc/repository/config/JdbcConfiguration.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.springframework.context.annotation.Bean;
2121
import org.springframework.context.annotation.Configuration;
2222
import org.springframework.core.convert.converter.Converter;
23-
import org.springframework.data.convert.CustomConversions;
2423
import org.springframework.data.jdbc.core.convert.JdbcCustomConversions;
2524
import org.springframework.data.relational.core.conversion.BasicRelationalConverter;
2625
import org.springframework.data.relational.core.conversion.RelationalConverter;
@@ -34,10 +33,17 @@
3433
* @author Jens Schauder
3534
* @author Mark Paluch
3635
* @author Michael Simons
36+
* @author Christoph Strobl
3737
*/
3838
@Configuration
3939
public class JdbcConfiguration {
4040

41+
/**
42+
* Register a {@link RelationalMappingContext} and apply an optional {@link NamingStrategy}.
43+
*
44+
* @param namingStrategy optional {@link NamingStrategy}. Use {@link NamingStrategy#INSTANCE} as fallback.
45+
* @return must not be {@literal null}.
46+
*/
4147
@Bean
4248
protected RelationalMappingContext jdbcMappingContext(Optional<NamingStrategy> namingStrategy) {
4349

@@ -48,16 +54,23 @@ protected RelationalMappingContext jdbcMappingContext(Optional<NamingStrategy> n
4854
return mappingContext;
4955
}
5056

57+
/**
58+
* Creates a {@link RelationalConverter} using the configured {@link #jdbcMappingContext(Optional)}. Will get
59+
* {@link #jdbcCustomConversions()} applied.
60+
*
61+
* @see #jdbcMappingContext(Optional)
62+
* @see #jdbcCustomConversions()
63+
* @return must not be {@literal null}.
64+
*/
5165
@Bean
5266
protected RelationalConverter relationalConverter(RelationalMappingContext mappingContext) {
5367
return new BasicRelationalConverter(mappingContext, jdbcCustomConversions());
5468
}
5569

5670
/**
57-
* Register custom {@link Converter}s in a {@link CustomConversions} object if required. These
58-
* {@link CustomConversions} will be registered with the
59-
* {@link #relationalConverter(RelationalMappingContext)}. Returns an empty
60-
* {@link JdbcCustomConversions} instance by default.
71+
* Register custom {@link Converter}s in a {@link JdbcCustomConversions} object if required. These
72+
* {@link JdbcCustomConversions} will be registered with the {@link #relationalConverter(RelationalMappingContext)}.
73+
* Returns an empty {@link JdbcCustomConversions} instance by default.
6174
*
6275
* @return must not be {@literal null}.
6376
*/

0 commit comments

Comments
 (0)