DATACMNS-1629 - Log module name in RepositoryConfigurationDelegate during repository scanning.
We now log the module name during repository scanning to indicate the used module and to avoid confusion about duplicate initialization when a single module is used that supports both, imperative and reactive repositories.
This commit is contained in:
@@ -53,6 +53,7 @@ import org.springframework.util.StopWatch;
|
|||||||
*
|
*
|
||||||
* @author Oliver Gierke
|
* @author Oliver Gierke
|
||||||
* @author Jens Schauder
|
* @author Jens Schauder
|
||||||
|
* @author Mark Paluch
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class RepositoryConfigurationDelegate {
|
public class RepositoryConfigurationDelegate {
|
||||||
@@ -123,7 +124,8 @@ public class RepositoryConfigurationDelegate {
|
|||||||
RepositoryConfigurationExtension extension) {
|
RepositoryConfigurationExtension extension) {
|
||||||
|
|
||||||
if (LOG.isInfoEnabled()) {
|
if (LOG.isInfoEnabled()) {
|
||||||
LOG.info("Bootstrapping Spring Data repositories in {} mode.", configurationSource.getBootstrapMode().name());
|
LOG.info("Bootstrapping Spring Data {} repositories in {} mode.", //
|
||||||
|
extension.getModuleName(), configurationSource.getBootstrapMode().name());
|
||||||
}
|
}
|
||||||
|
|
||||||
extension.registerBeansForRoot(registry, configurationSource);
|
extension.registerBeansForRoot(registry, configurationSource);
|
||||||
@@ -135,7 +137,8 @@ public class RepositoryConfigurationDelegate {
|
|||||||
StopWatch watch = new StopWatch();
|
StopWatch watch = new StopWatch();
|
||||||
|
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.debug("Scanning for repositories in packages {}.",
|
LOG.debug("Scanning for {} repositories in packages {}.", //
|
||||||
|
extension.getModuleName(), //
|
||||||
configurationSource.getBasePackages().stream().collect(Collectors.joining(", ")));
|
configurationSource.getBasePackages().stream().collect(Collectors.joining(", ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,8 +184,8 @@ public class RepositoryConfigurationDelegate {
|
|||||||
watch.stop();
|
watch.stop();
|
||||||
|
|
||||||
if (LOG.isInfoEnabled()) {
|
if (LOG.isInfoEnabled()) {
|
||||||
LOG.info("Finished Spring Data repository scanning in {}ms. Found {} repository interfaces.", //
|
LOG.info("Finished Spring Data repository scanning in {}ms. Found {} {} repository interfaces.", //
|
||||||
watch.getLastTaskTimeMillis(), configurations.size());
|
watch.getLastTaskTimeMillis(), configurations.size(), extension.getModuleName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return definitions;
|
return definitions;
|
||||||
|
|||||||
Reference in New Issue
Block a user