Polishing.
Refine name and visibility of runtime hints registrars. See #1279 see #1269
This commit is contained in:
@@ -32,10 +32,12 @@ import org.springframework.data.relational.core.mapping.event.BeforeSaveCallback
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link RuntimeHintsRegistrar} for JDBC.
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @since 3.0
|
||||
*/
|
||||
public class DataJdbcRuntimeHints implements RuntimeHintsRegistrar {
|
||||
class JdbcRuntimeHintsRegistrar implements RuntimeHintsRegistrar {
|
||||
|
||||
@Override
|
||||
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
|
||||
@@ -123,10 +123,9 @@ public class AbstractJdbcConfiguration implements ApplicationContextAware {
|
||||
|
||||
/**
|
||||
* Creates a {@link RelationalConverter} using the configured
|
||||
* {@link #jdbcMappingContext(Optional, JdbcCustomConversions)}. Will get {@link #jdbcCustomConversions()} ()}
|
||||
* applied.
|
||||
* {@link #jdbcMappingContext(Optional, JdbcCustomConversions, RelationalManagedTypes)}.
|
||||
*
|
||||
* @see #jdbcMappingContext(Optional, JdbcCustomConversions)
|
||||
* @see #jdbcMappingContext(Optional, JdbcCustomConversions, RelationalManagedTypes)
|
||||
* @see #jdbcCustomConversions()
|
||||
* @return must not be {@literal null}.
|
||||
*/
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
org.springframework.aot.hint.RuntimeHintsRegistrar=\
|
||||
org.springframework.data.jdbc.aot.DataJdbcRuntimeHints
|
||||
org.springframework.data.jdbc.aot.JdbcRuntimeHintsRegistrar
|
||||
|
||||
@@ -28,21 +28,22 @@ import org.springframework.data.r2dbc.mapping.event.BeforeSaveCallback;
|
||||
import org.springframework.data.r2dbc.repository.support.SimpleR2dbcRepository;
|
||||
|
||||
/**
|
||||
* {@link RuntimeHintsRegistrar} for R2DBC.
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @since 3.0
|
||||
*/
|
||||
public class R2dbcRuntimeHints implements RuntimeHintsRegistrar {
|
||||
class R2dbcRuntimeHintsRegistrar implements RuntimeHintsRegistrar {
|
||||
|
||||
@Override
|
||||
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
|
||||
|
||||
hints.reflection().registerTypes(Arrays.asList(
|
||||
TypeReference.of(SimpleR2dbcRepository.class),
|
||||
TypeReference.of(AfterConvertCallback.class),
|
||||
TypeReference.of(BeforeConvertCallback.class),
|
||||
TypeReference.of(BeforeSaveCallback.class),
|
||||
TypeReference.of(AfterSaveCallback.class)
|
||||
),
|
||||
hints.reflection()
|
||||
.registerTypes(
|
||||
Arrays.asList(TypeReference.of(SimpleR2dbcRepository.class), TypeReference.of(AfterConvertCallback.class),
|
||||
TypeReference
|
||||
.of(BeforeConvertCallback.class),
|
||||
TypeReference.of(BeforeSaveCallback.class), TypeReference.of(AfterSaveCallback.class)),
|
||||
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS));
|
||||
}
|
||||
}
|
||||
@@ -208,12 +208,12 @@ public abstract class AbstractR2dbcConfiguration implements ApplicationContextAw
|
||||
|
||||
/**
|
||||
* Creates a {@link org.springframework.data.r2dbc.convert.R2dbcConverter} using the configured
|
||||
* {@link #r2dbcMappingContext(Optional, R2dbcCustomConversions)} R2dbcMappingContext}.
|
||||
* {@link #r2dbcMappingContext(Optional, R2dbcCustomConversions, RelationalManagedTypes)} R2dbcMappingContext}.
|
||||
*
|
||||
* @param mappingContext the configured {@link R2dbcMappingContext}.
|
||||
* @param r2dbcCustomConversions customized R2DBC conversions.
|
||||
* @return must not be {@literal null}.
|
||||
* @see #r2dbcMappingContext(Optional, R2dbcCustomConversions)
|
||||
* @see #r2dbcMappingContext(Optional, R2dbcCustomConversions, RelationalManagedTypes)
|
||||
* @see #getDialect(ConnectionFactory)
|
||||
* @throws IllegalArgumentException if any of the {@literal mappingContext} is {@literal null}.
|
||||
* @since 1.2
|
||||
@@ -230,7 +230,7 @@ public abstract class AbstractR2dbcConfiguration implements ApplicationContextAw
|
||||
/**
|
||||
* Register custom {@link Converter}s in a {@link CustomConversions} object if required. These
|
||||
* {@link CustomConversions} will be registered with the {@link BasicRelationalConverter} and
|
||||
* {@link #r2dbcMappingContext(Optional, R2dbcCustomConversions)}. Returns an empty {@link R2dbcCustomConversions}
|
||||
* {@link #r2dbcMappingContext(Optional, R2dbcCustomConversions, RelationalManagedTypes)}. Returns an empty {@link R2dbcCustomConversions}
|
||||
* instance by default. Override {@link #getCustomConverters()} to supply custom converters.
|
||||
*
|
||||
* @return must not be {@literal null}.
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
org.springframework.aot.hint.RuntimeHintsRegistrar=\
|
||||
org.springframework.data.r2dbc.aot.R2dbcRuntimeHints
|
||||
org.springframework.data.r2dbc.aot.R2dbcRuntimeHintsRegistrar
|
||||
|
||||
Reference in New Issue
Block a user