Rename uppercase 'LOGGER' static finals
Rename static final `LOGGER` members to use the lowercase form. Although the loggers are static final, they are not constant values.
This commit is contained in:
committed by
Mark Paluch
parent
c9a5a19738
commit
ea263b233b
@@ -40,7 +40,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class AuditingHandler implements InitializingBean {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AuditingHandler.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(AuditingHandler.class);
|
||||
|
||||
private final DefaultAuditableBeanWrapperFactory factory;
|
||||
|
||||
@@ -165,12 +165,12 @@ public class AuditingHandler implements InitializingBean {
|
||||
Optional<Object> auditor = touchAuditor(it, isNew);
|
||||
Optional<TemporalAccessor> now = dateTimeForNow ? touchDate(it, isNew) : Optional.empty();
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
Object defaultedNow = now.map(Object::toString).orElse("not set");
|
||||
Object defaultedAuditor = auditor.map(Object::toString).orElse("unknown");
|
||||
|
||||
LOGGER.debug("Touched {} - Last modification at {} by {}", target, defaultedNow, defaultedAuditor);
|
||||
logger.debug("Touched {} - Last modification at {} by {}", target, defaultedNow, defaultedAuditor);
|
||||
}
|
||||
|
||||
return it.getBean();
|
||||
@@ -229,7 +229,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
public void afterPropertiesSet() {
|
||||
|
||||
if (!auditorAware.isPresent()) {
|
||||
LOGGER.debug("No AuditorAware set! Auditing will not be applied!");
|
||||
logger.debug("No AuditorAware set! Auditing will not be applied!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ import org.springframework.util.ObjectUtils;
|
||||
*/
|
||||
public class CustomConversions {
|
||||
|
||||
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(CustomConversions.class);
|
||||
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(CustomConversions.class);
|
||||
private static final String READ_CONVERTER_NOT_SIMPLE = "Registering converter from %s to %s as reading converter although it doesn't convert from a store-supported type! You might want to check your annotation setup at the converter implementation.";
|
||||
private static final String WRITE_CONVERTER_NOT_SIMPLE = "Registering converter from %s to %s as writing converter although it doesn't convert to a store-supported type! You might want to check your annotation setup at the converter implementation.";
|
||||
private static final String NOT_A_CONVERTER = "Converter %s is neither a Spring Converter, GenericConverter or ConverterFactory!";
|
||||
@@ -255,8 +255,8 @@ public class CustomConversions {
|
||||
|
||||
readingPairs.add(pair);
|
||||
|
||||
if (LOG.isWarnEnabled() && !converterRegistration.isSimpleSourceType()) {
|
||||
LOG.warn(String.format(READ_CONVERTER_NOT_SIMPLE, pair.getSourceType(), pair.getTargetType()));
|
||||
if (logger.isWarnEnabled() && !converterRegistration.isSimpleSourceType()) {
|
||||
logger.warn(String.format(READ_CONVERTER_NOT_SIMPLE, pair.getSourceType(), pair.getTargetType()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,8 +265,8 @@ public class CustomConversions {
|
||||
writingPairs.add(pair);
|
||||
customSimpleTypes.add(pair.getSourceType());
|
||||
|
||||
if (LOG.isWarnEnabled() && !converterRegistration.isSimpleTargetType()) {
|
||||
LOG.warn(String.format(WRITE_CONVERTER_NOT_SIMPLE, pair.getSourceType(), pair.getTargetType()));
|
||||
if (logger.isWarnEnabled() && !converterRegistration.isSimpleTargetType()) {
|
||||
logger.warn(String.format(WRITE_CONVERTER_NOT_SIMPLE, pair.getSourceType(), pair.getTargetType()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,14 +288,14 @@ public class CustomConversions {
|
||||
|| (registrationIntent.isReading() && registrationIntent.isSimpleSourceType())
|
||||
|| (registrationIntent.isWriting() && registrationIntent.isSimpleTargetType());
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
if (register) {
|
||||
LOG.debug(String.format(ADD_CONVERTER, registrationIntent.isUserConverter() ? "user defined " : "",
|
||||
logger.debug(String.format(ADD_CONVERTER, registrationIntent.isUserConverter() ? "user defined " : "",
|
||||
registrationIntent.getSourceType(), registrationIntent.getTargetType(),
|
||||
registrationIntent.isReading() ? "reading" : "writing"));
|
||||
} else {
|
||||
LOG.debug(String.format(SKIP_CONVERTER, registrationIntent.getSourceType(), registrationIntent.getTargetType(),
|
||||
logger.debug(String.format(SKIP_CONVERTER, registrationIntent.getSourceType(), registrationIntent.getTargetType(),
|
||||
registrationIntent.isReading() ? "reading" : "writing",
|
||||
registrationIntent.isReading() ? registrationIntent.getSourceType() : registrationIntent.getTargetType()));
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
class SimplePersistentPropertyPathAccessor<T> implements PersistentPropertyPathAccessor<T> {
|
||||
|
||||
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(SimplePersistentPropertyPathAccessor.class);
|
||||
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(SimplePersistentPropertyPathAccessor.class);
|
||||
|
||||
private final PersistentPropertyAccessor<T> delegate;
|
||||
|
||||
@@ -222,7 +222,7 @@ class SimplePersistentPropertyPathAccessor<T> implements PersistentPropertyPathA
|
||||
String nullIntermediateMessage = "Cannot lookup property %s on null intermediate! Original path was: %s on %s.";
|
||||
|
||||
if (SetNulls.SKIP_AND_LOG.equals(handling)) {
|
||||
LOG.info(nullIntermediateMessage);
|
||||
logger.info(nullIntermediateMessage);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class DefaultProjectionInformation implements ProjectionInformation {
|
||||
*/
|
||||
private static class PropertyDescriptorSource {
|
||||
|
||||
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(PropertyDescriptorSource.class);
|
||||
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(PropertyDescriptorSource.class);
|
||||
|
||||
private final Class<?> type;
|
||||
private final Optional<MethodsMetadata> metadata;
|
||||
@@ -237,7 +237,7 @@ class DefaultProjectionInformation implements ProjectionInformation {
|
||||
|
||||
} catch (IOException e) {
|
||||
|
||||
LOG.info("Couldn't read class metadata for {}. Input property calculation might fail!", type);
|
||||
logger.info("Couldn't read class metadata for {}. Input property calculation might fail!", type);
|
||||
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapable {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(CdiRepositoryBean.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(CdiRepositoryBean.class);
|
||||
private static final CdiRepositoryConfiguration DEFAULT_CONFIGURATION = DefaultCdiRepositoryConfiguration.INSTANCE;
|
||||
|
||||
private final Set<Annotation> qualifiers;
|
||||
@@ -209,11 +209,11 @@ public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapabl
|
||||
T repoInstance = this.repoInstance;
|
||||
|
||||
if (repoInstance != null) {
|
||||
LOGGER.debug("Returning eagerly created CDI repository instance for {}.", repositoryType.getName());
|
||||
logger.debug("Returning eagerly created CDI repository instance for {}.", repositoryType.getName());
|
||||
return repoInstance;
|
||||
}
|
||||
|
||||
LOGGER.debug("Creating CDI repository bean instance for {}.", repositoryType.getName());
|
||||
logger.debug("Creating CDI repository bean instance for {}.", repositoryType.getName());
|
||||
repoInstance = create(creationalContext, repositoryType);
|
||||
this.repoInstance = repoInstance;
|
||||
|
||||
@@ -227,8 +227,8 @@ public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapabl
|
||||
public void destroy(@SuppressWarnings("null") T instance,
|
||||
@SuppressWarnings("null") CreationalContext<T> creationalContext) {
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(String.format("Destroying bean instance %s for repository type '%s'.", instance.toString(),
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(String.format("Destroying bean instance %s for repository type '%s'.", instance.toString(),
|
||||
repositoryType.getName()));
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ import org.springframework.data.repository.config.CustomRepositoryImplementation
|
||||
*/
|
||||
public abstract class CdiRepositoryExtensionSupport implements Extension {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(CdiRepositoryExtensionSupport.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(CdiRepositoryExtensionSupport.class);
|
||||
|
||||
private final Map<Class<?>, Set<Annotation>> repositoryTypes = new HashMap<>();
|
||||
private final Set<CdiRepositoryBean<?>> eagerRepositories = new HashSet<>();
|
||||
@@ -78,8 +78,8 @@ public abstract class CdiRepositoryExtensionSupport implements Extension {
|
||||
// Determine the qualifiers of the repository type.
|
||||
Set<Annotation> qualifiers = getQualifiers(repositoryType);
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(
|
||||
String.format("Discovered repository type '%s' with qualifiers %s.", repositoryType.getName(), qualifiers));
|
||||
}
|
||||
// Store the repository type using its qualifiers.
|
||||
@@ -138,7 +138,7 @@ public abstract class CdiRepositoryExtensionSupport implements Extension {
|
||||
|
||||
for (CdiRepositoryBean<?> bean : eagerRepositories) {
|
||||
|
||||
LOGGER.debug("Eagerly instantiating CDI repository bean for {}.", bean.getBeanClass());
|
||||
logger.debug("Eagerly instantiating CDI repository bean for {}.", bean.getBeanClass());
|
||||
bean.initialize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.data.repository.Repository;
|
||||
*/
|
||||
class DeferredRepositoryInitializationListener implements ApplicationListener<ContextRefreshedEvent>, Ordered {
|
||||
|
||||
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(DeferredRepositoryInitializationListener.class);
|
||||
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(DeferredRepositoryInitializationListener.class);
|
||||
private final ListableBeanFactory beanFactory;
|
||||
|
||||
DeferredRepositoryInitializationListener(ListableBeanFactory beanFactory) {
|
||||
@@ -47,11 +47,11 @@ class DeferredRepositoryInitializationListener implements ApplicationListener<Co
|
||||
@Override
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
|
||||
LOG.info("Triggering deferred initialization of Spring Data repositories…");
|
||||
logger.info("Triggering deferred initialization of Spring Data repositories…");
|
||||
|
||||
beanFactory.getBeansOfType(Repository.class);
|
||||
|
||||
LOG.info("Spring Data repositories initialized!");
|
||||
logger.info("Spring Data repositories initialized!");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
class RepositoryBeanDefinitionBuilder {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RepositoryBeanDefinitionBuilder.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(RepositoryBeanDefinitionBuilder.class);
|
||||
|
||||
private final BeanDefinitionRegistry registry;
|
||||
private final RepositoryConfigurationExtension extension;
|
||||
@@ -148,8 +148,8 @@ class RepositoryBeanDefinitionBuilder {
|
||||
|
||||
return beanDefinition.map(it -> {
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Registering custom repository implementation: " + lookup.getImplementationBeanName() + " "
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Registering custom repository implementation: " + lookup.getImplementationBeanName() + " "
|
||||
+ it.getBeanClassName());
|
||||
}
|
||||
|
||||
@@ -192,8 +192,8 @@ class RepositoryBeanDefinitionBuilder {
|
||||
return;
|
||||
}
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(String.format("Registering repository fragment implementation: %s %s", beanName,
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(String.format("Registering repository fragment implementation: %s %s", beanName,
|
||||
fragmentConfiguration.getClassName()));
|
||||
}
|
||||
|
||||
@@ -214,8 +214,8 @@ class RepositoryBeanDefinitionBuilder {
|
||||
return;
|
||||
}
|
||||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Registering repository fragment: " + beanName);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Registering repository fragment: " + beanName);
|
||||
}
|
||||
|
||||
BeanDefinitionBuilder fragmentBuilder = BeanDefinitionBuilder.rootBeanDefinition(RepositoryFragment.class,
|
||||
|
||||
@@ -61,7 +61,7 @@ public class RepositoryConfigurationDelegate {
|
||||
|
||||
static final String FACTORY_BEAN_OBJECT_TYPE = "factoryBeanObjectType";
|
||||
|
||||
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(RepositoryConfigurationDelegate.class);
|
||||
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(RepositoryConfigurationDelegate.class);
|
||||
|
||||
private final RepositoryConfigurationSource configurationSource;
|
||||
private final ResourceLoader resourceLoader;
|
||||
@@ -122,8 +122,8 @@ public class RepositoryConfigurationDelegate {
|
||||
public List<BeanComponentDefinition> registerRepositoriesIn(BeanDefinitionRegistry registry,
|
||||
RepositoryConfigurationExtension extension) {
|
||||
|
||||
if (LOG.isInfoEnabled()) {
|
||||
LOG.info("Bootstrapping Spring Data {} repositories in {} mode.", //
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Bootstrapping Spring Data {} repositories in {} mode.", //
|
||||
extension.getModuleName(), configurationSource.getBootstrapMode().name());
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ public class RepositoryConfigurationDelegate {
|
||||
|
||||
StopWatch watch = new StopWatch();
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Scanning for {} repositories in packages {}.", //
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Scanning for {} repositories in packages {}.", //
|
||||
extension.getModuleName(), //
|
||||
configurationSource.getBasePackages().stream().collect(Collectors.joining(", ")));
|
||||
}
|
||||
@@ -167,8 +167,8 @@ public class RepositoryConfigurationDelegate {
|
||||
|
||||
String beanName = configurationSource.generateBeanName(beanDefinition);
|
||||
|
||||
if (LOG.isTraceEnabled()) {
|
||||
LOG.trace(REPOSITORY_REGISTRATION, extension.getModuleName(), beanName, configuration.getRepositoryInterface(),
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(REPOSITORY_REGISTRATION, extension.getModuleName(), beanName, configuration.getRepositoryInterface(),
|
||||
configuration.getRepositoryFactoryBeanClassName());
|
||||
}
|
||||
|
||||
@@ -182,8 +182,8 @@ public class RepositoryConfigurationDelegate {
|
||||
|
||||
watch.stop();
|
||||
|
||||
if (LOG.isInfoEnabled()) {
|
||||
LOG.info("Finished Spring Data repository scanning in {}ms. Found {} {} repository interfaces.", //
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Finished Spring Data repository scanning in {}ms. Found {} {} repository interfaces.", //
|
||||
watch.getLastTaskTimeMillis(), configurations.size(), extension.getModuleName());
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ public class RepositoryConfigurationDelegate {
|
||||
if (!Arrays.asList(ContextAnnotationAutowireCandidateResolver.class, LazyRepositoryInjectionPointResolver.class)
|
||||
.contains(resolver.getClass())) {
|
||||
|
||||
LOG.warn(NON_DEFAULT_AUTOWIRE_CANDIDATE_RESOLVER, resolver.getClass().getName());
|
||||
logger.warn(NON_DEFAULT_AUTOWIRE_CANDIDATE_RESOLVER, resolver.getClass().getName());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ public class RepositoryConfigurationDelegate {
|
||||
|
||||
if (mode.equals(BootstrapMode.DEFERRED)) {
|
||||
|
||||
LOG.debug("Registering deferred repository initialization listener.");
|
||||
logger.debug("Registering deferred repository initialization listener.");
|
||||
|
||||
beanFactory.registerSingleton(DeferredRepositoryInitializationListener.class.getName(),
|
||||
new DeferredRepositoryInitializationListener(beanFactory));
|
||||
@@ -245,7 +245,7 @@ public class RepositoryConfigurationDelegate {
|
||||
.loadFactoryNames(RepositoryFactorySupport.class, resourceLoader.getClassLoader()).size() > 1;
|
||||
|
||||
if (multipleModulesFound) {
|
||||
LOG.info(MULTIPLE_MODULES);
|
||||
logger.info(MULTIPLE_MODULES);
|
||||
}
|
||||
|
||||
return multipleModulesFound;
|
||||
@@ -260,7 +260,7 @@ public class RepositoryConfigurationDelegate {
|
||||
*/
|
||||
static class LazyRepositoryInjectionPointResolver extends ContextAnnotationAutowireCandidateResolver {
|
||||
|
||||
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(LazyRepositoryInjectionPointResolver.class);
|
||||
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(LazyRepositoryInjectionPointResolver.class);
|
||||
private final Map<String, RepositoryConfiguration<?>> configurations;
|
||||
|
||||
public LazyRepositoryInjectionPointResolver(Map<String, RepositoryConfiguration<?>> configurations) {
|
||||
@@ -301,7 +301,7 @@ public class RepositoryConfigurationDelegate {
|
||||
boolean lazyInit = configuration.isLazyInit();
|
||||
|
||||
if (lazyInit) {
|
||||
LOG.debug("Creating lazy injection proxy for {}…", configuration.getRepositoryInterface());
|
||||
logger.debug("Creating lazy injection proxy for {}…", configuration.getRepositoryInterface());
|
||||
}
|
||||
|
||||
return lazyInit;
|
||||
|
||||
@@ -52,7 +52,7 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public abstract class RepositoryConfigurationExtensionSupport implements RepositoryConfigurationExtension {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RepositoryConfigurationExtensionSupport.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(RepositoryConfigurationExtensionSupport.class);
|
||||
private static final String CLASS_LOADING_ERROR = "%s - Could not load type %s using class loader %s.";
|
||||
private static final String MULTI_STORE_DROPPED = "Spring Data %s - Could not safely identify store assignment for repository candidate %s. If you want this repository to be a %s repository,";
|
||||
|
||||
@@ -307,7 +307,7 @@ public abstract class RepositoryConfigurationExtensionSupport implements Reposit
|
||||
|
||||
if (types.isEmpty() && annotations.isEmpty()) {
|
||||
if (!noMultiStoreSupport) {
|
||||
LOGGER.warn("Spring Data {} does not support multi-store setups!", moduleName);
|
||||
logger.warn("Spring Data {} does not support multi-store setups!", moduleName);
|
||||
noMultiStoreSupport = true;
|
||||
return false;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ public abstract class RepositoryConfigurationExtensionSupport implements Reposit
|
||||
.concat(".");
|
||||
}
|
||||
|
||||
LOGGER.info(message);
|
||||
logger.info(message);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -388,7 +388,7 @@ public abstract class RepositoryConfigurationExtensionSupport implements Reposit
|
||||
try {
|
||||
return org.springframework.util.ClassUtils.forName(repositoryInterface, classLoader);
|
||||
} catch (ClassNotFoundException | LinkageError e) {
|
||||
LOGGER.warn(String.format(CLASS_LOADING_ERROR, getModuleName(), repositoryInterface, classLoader), e);
|
||||
logger.warn(String.format(CLASS_LOADING_ERROR, getModuleName(), repositoryInterface, classLoader), e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -108,7 +108,7 @@ public abstract class RepositoryFactorySupport implements BeanClassLoaderAware,
|
||||
};
|
||||
|
||||
final static GenericConversionService CONVERSION_SERVICE = new DefaultConversionService();
|
||||
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(RepositoryFactorySupport.class);
|
||||
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(RepositoryFactorySupport.class);
|
||||
|
||||
static {
|
||||
QueryExecutionConverters.registerConvertersIn(CONVERSION_SERVICE);
|
||||
@@ -288,8 +288,8 @@ public abstract class RepositoryFactorySupport implements BeanClassLoaderAware,
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
public <T> T getRepository(Class<T> repositoryInterface, RepositoryFragments fragments) {
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Initializing repository instance for {}…", repositoryInterface.getName());
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Initializing repository instance for {}…", repositoryInterface.getName());
|
||||
}
|
||||
|
||||
Assert.notNull(repositoryInterface, "Repository interface must not be null!");
|
||||
@@ -331,8 +331,8 @@ public abstract class RepositoryFactorySupport implements BeanClassLoaderAware,
|
||||
|
||||
T repository = (T) result.getProxy(classLoader);
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Finished creation of repository instance for {}.", repositoryInterface.getName());
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Finished creation of repository instance for {}.", repositoryInterface.getName());
|
||||
}
|
||||
|
||||
return repository;
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class ResourceReaderRepositoryPopulator implements RepositoryPopulator, ApplicationEventPublisherAware {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ResourceReaderRepositoryPopulator.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceReaderRepositoryPopulator.class);
|
||||
|
||||
private final ResourceReader reader;
|
||||
private final @Nullable ClassLoader classLoader;
|
||||
@@ -118,7 +118,7 @@ public class ResourceReaderRepositoryPopulator implements RepositoryPopulator, A
|
||||
|
||||
for (Resource resource : resources) {
|
||||
|
||||
LOGGER.info(String.format("Reading resource: %s", resource));
|
||||
logger.info(String.format("Reading resource: %s", resource));
|
||||
|
||||
Object result = readObjectFrom(resource);
|
||||
|
||||
@@ -127,7 +127,7 @@ public class ResourceReaderRepositoryPopulator implements RepositoryPopulator, A
|
||||
if (element != null) {
|
||||
persist(element, invokerFactory);
|
||||
} else {
|
||||
LOGGER.info("Skipping null element found in unmarshal result!");
|
||||
logger.info("Skipping null element found in unmarshal result!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -163,7 +163,7 @@ public class ResourceReaderRepositoryPopulator implements RepositoryPopulator, A
|
||||
private void persist(Object object, RepositoryInvokerFactory invokerFactory) {
|
||||
|
||||
RepositoryInvoker invoker = invokerFactory.getInvokerFor(object.getClass());
|
||||
LOGGER.debug(String.format("Persisting %s using repository %s", object, invoker));
|
||||
logger.debug(String.format("Persisting %s using repository %s", object, invoker));
|
||||
invoker.invokeSave(object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class ChainedTransactionManager implements PlatformTransactionManager {
|
||||
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(ChainedTransactionManager.class);
|
||||
private final static Logger logger = LoggerFactory.getLogger(ChainedTransactionManager.class);
|
||||
|
||||
private final List<PlatformTransactionManager> transactionManagers;
|
||||
private final SynchronizationManager synchronizationManager;
|
||||
@@ -116,7 +116,7 @@ public class ChainedTransactionManager implements PlatformTransactionManager {
|
||||
transactionManager.rollback(transactionStatuses.get(transactionManager));
|
||||
}
|
||||
} catch (Exception ex2) {
|
||||
LOGGER.warn("Rollback exception (" + transactionManager + ") " + ex2.getMessage(), ex2);
|
||||
logger.warn("Rollback exception (" + transactionManager + ") " + ex2.getMessage(), ex2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public class ChainedTransactionManager implements PlatformTransactionManager {
|
||||
try {
|
||||
multiTransactionStatus.rollback(transactionManager);
|
||||
} catch (Exception ex) {
|
||||
LOGGER.warn("Rollback exception (after commit) (" + transactionManager + ") " + ex.getMessage(), ex);
|
||||
logger.warn("Rollback exception (after commit) (" + transactionManager + ") " + ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,7 +197,7 @@ public class ChainedTransactionManager implements PlatformTransactionManager {
|
||||
rollbackException = ex;
|
||||
rollbackExceptionTransactionManager = transactionManager;
|
||||
} else {
|
||||
LOGGER.warn("Rollback exception (" + transactionManager + ") " + ex.getMessage(), ex);
|
||||
logger.warn("Rollback exception (" + transactionManager + ") " + ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ import org.springframework.web.util.UriComponentsBuilder;
|
||||
*/
|
||||
public class PagedResourcesAssemblerArgumentResolver implements HandlerMethodArgumentResolver {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PagedResourcesAssemblerArgumentResolver.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(PagedResourcesAssemblerArgumentResolver.class);
|
||||
|
||||
private static final String SUPERFLOUS_QUALIFIER = "Found qualified {} parameter, but a unique unqualified {} parameter. Using that one, but you might want to check your controller method configuration!";
|
||||
private static final String PARAMETER_AMBIGUITY = "Discovered multiple parameters of type Pageable but no qualifier annotations to disambiguate!";
|
||||
@@ -151,7 +151,7 @@ public class PagedResourcesAssemblerArgumentResolver implements HandlerMethodArg
|
||||
MethodParameter matchingParameter = returnIfQualifiersMatch(pageableParameter, assemblerQualifier);
|
||||
|
||||
if (matchingParameter == null) {
|
||||
LOGGER.info(SUPERFLOUS_QUALIFIER, PagedResourcesAssembler.class.getSimpleName(), Pageable.class.getName());
|
||||
logger.info(SUPERFLOUS_QUALIFIER, PagedResourcesAssembler.class.getSimpleName(), Pageable.class.getName());
|
||||
}
|
||||
|
||||
return pageableParameter;
|
||||
|
||||
Reference in New Issue
Block a user