From 31c385470e305a30dadb4c050148626dc8135f3b Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 4 Feb 2014 12:29:40 -0800 Subject: [PATCH] Update ErrorMvcAutoConfiguration for Spring 4 Update ErrorMvcAutoConfiguration thymeleaf condition to use the `spring4` package. Fixes gh-310 --- .../boot/actuate/autoconfigure/ErrorMvcAutoConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ErrorMvcAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ErrorMvcAutoConfiguration.java index f4de7e4c82..42af480d46 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ErrorMvcAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ErrorMvcAutoConfiguration.java @@ -115,10 +115,11 @@ public class ErrorMvcAutoConfiguration implements EmbeddedServletContainerCustom } private static class ErrorTemplateMissingCondition extends SpringBootCondition { + @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { - if (ClassUtils.isPresent("org.thymeleaf.spring3.SpringTemplateEngine", + if (ClassUtils.isPresent("org.thymeleaf.spring4.SpringTemplateEngine", context.getClassLoader())) { if (DefaultTemplateResolverConfiguration.templateExists( context.getEnvironment(), context.getResourceLoader(), "error")) { @@ -135,6 +136,7 @@ public class ErrorMvcAutoConfiguration implements EmbeddedServletContainerCustom } return ConditionOutcome.match("no error template view detected"); }; + } private static class SpelView implements View {