Browse Source

Polish

pull/10941/merge
Phillip Webb 8 years ago
parent
commit
1e7d85a632
  1. 3
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/PathBasedTemplateAvailabilityProvider.java
  2. 3
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java

3
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/PathBasedTemplateAvailabilityProvider.java

@ -55,10 +55,9 @@ public abstract class PathBasedTemplateAvailabilityProvider @@ -55,10 +55,9 @@ public abstract class PathBasedTemplateAvailabilityProvider
ClassLoader classLoader, ResourceLoader resourceLoader) {
if (ClassUtils.isPresent(this.className, classLoader)) {
Binder binder = Binder.get(environment);
TemplateAvailabilityProperties properties1 = binder
TemplateAvailabilityProperties properties = binder
.bind(this.propertyPrefix, this.propertiesClass)
.orElseCreate(this.propertiesClass);
TemplateAvailabilityProperties properties = properties1;
return isTemplateAvailable(view, resourceLoader, properties);
}
return false;

3
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java

@ -269,7 +269,8 @@ public abstract class AbstractServletWebServerFactoryTests { @@ -269,7 +269,8 @@ public abstract class AbstractServletWebServerFactoryTests {
factory.setContextPath("/custom");
this.webServer = factory.getWebServer(exampleServletRegistration());
this.webServer.start();
assertThat(this.output.toString()).containsOnlyOnce("with context path '/custom'");
assertThat(this.output.toString())
.containsOnlyOnce("with context path '/custom'");
}
@Test

Loading…
Cancel
Save