Polish
This commit is contained in:
@@ -69,7 +69,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
||||
@Import(DataSourceInitializedPublisher.Registrar.class)
|
||||
public abstract class JpaBaseConfiguration implements BeanFactoryAware {
|
||||
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
private static final Log logger = LogFactory.getLog(JpaBaseConfiguration.class);
|
||||
|
||||
private final DataSource dataSource;
|
||||
|
||||
@@ -197,8 +197,8 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware {
|
||||
return ResourceUtils.extractJarFileURL(url);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Could not determine persistence "
|
||||
+ "unit root location from " + source + " : " + ex);
|
||||
logger.info("Could not determine persistence " + "unit root location from "
|
||||
+ source + " : " + ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ abstract class AbstractTemplateResolverConfiguration {
|
||||
private static final Log logger = LogFactory
|
||||
.getLog(AbstractTemplateResolverConfiguration.class);
|
||||
|
||||
protected final ThymeleafProperties properties;
|
||||
private final ThymeleafProperties properties;
|
||||
|
||||
private final ApplicationContext applicationContext;
|
||||
|
||||
@@ -47,6 +47,10 @@ abstract class AbstractTemplateResolverConfiguration {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
protected final ThymeleafProperties getProperties() {
|
||||
return this.properties;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void checkTemplateLocationExists() {
|
||||
boolean checkTemplateLocation = this.properties.isCheckTemplateLocation();
|
||||
|
||||
@@ -137,9 +137,10 @@ public class ThymeleafAutoConfiguration {
|
||||
@Override
|
||||
public SpringResourceTemplateResolver defaultTemplateResolver() {
|
||||
SpringResourceTemplateResolver resolver = super.defaultTemplateResolver();
|
||||
Method setCheckExistence = ReflectionUtils
|
||||
.findMethod(resolver.getClass(), "setCheckExistence", boolean.class);
|
||||
ReflectionUtils.invokeMethod(setCheckExistence, resolver, this.properties.isCheckTemplate());
|
||||
Method setCheckExistence = ReflectionUtils.findMethod(resolver.getClass(),
|
||||
"setCheckExistence", boolean.class);
|
||||
ReflectionUtils.invokeMethod(setCheckExistence, resolver,
|
||||
getProperties().isCheckTemplate());
|
||||
return resolver;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public class ThymeleafProperties {
|
||||
}
|
||||
|
||||
public boolean isCheckTemplate() {
|
||||
return checkTemplate;
|
||||
return this.checkTemplate;
|
||||
}
|
||||
|
||||
public void setCheckTemplate(boolean checkTemplate) {
|
||||
|
||||
@@ -68,7 +68,7 @@ public class MultipartAutoConfiguration {
|
||||
@ConditionalOnMissingBean(MultipartResolver.class)
|
||||
public StandardServletMultipartResolver multipartResolver() {
|
||||
StandardServletMultipartResolver multipartResolver = new StandardServletMultipartResolver();
|
||||
multipartResolver.setResolveLazily(multipartProperties.isResolveLazily());
|
||||
multipartResolver.setResolveLazily(this.multipartProperties.isResolveLazily());
|
||||
return multipartResolver;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public class MultipartProperties {
|
||||
}
|
||||
|
||||
public boolean isResolveLazily() {
|
||||
return resolveLazily;
|
||||
return this.resolveLazily;
|
||||
}
|
||||
|
||||
public void setResolveLazily(boolean resolveLazily) {
|
||||
|
||||
Reference in New Issue
Block a user