|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2012-2015 the original author or authors. |
|
|
|
|
* Copyright 2012-2016 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
@@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
|
|
|
|
|
import org.apache.commons.logging.LogFactory; |
|
|
|
|
import org.thymeleaf.dialect.IDialect; |
|
|
|
|
import org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect; |
|
|
|
|
import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect; |
|
|
|
|
import org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect; |
|
|
|
|
import org.thymeleaf.spring4.SpringTemplateEngine; |
|
|
|
|
import org.thymeleaf.spring4.resourceresolver.SpringResourceResourceResolver; |
|
|
|
|
@ -40,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired;
@@ -40,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigureAfter; |
|
|
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnJava; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; |
|
|
|
|
@ -61,6 +63,7 @@ import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter;
@@ -61,6 +63,7 @@ import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter;
|
|
|
|
|
* @author Andy Wilkinson |
|
|
|
|
* @author Stephane Nicoll |
|
|
|
|
* @author Brian Clozel |
|
|
|
|
* @author Eddú Meléndez |
|
|
|
|
*/ |
|
|
|
|
@Configuration |
|
|
|
|
@EnableConfigurationProperties(ThymeleafProperties.class) |
|
|
|
|
@ -190,6 +193,19 @@ public class ThymeleafAutoConfiguration {
@@ -190,6 +193,19 @@ public class ThymeleafAutoConfiguration {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
|
@ConditionalOnJava(ConditionalOnJava.JavaVersion.EIGHT) |
|
|
|
|
@ConditionalOnClass(Java8TimeDialect.class) |
|
|
|
|
protected static class ThymeleafJava8TimeDialect { |
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
@ConditionalOnMissingBean |
|
|
|
|
public Java8TimeDialect java8TimeDialect() { |
|
|
|
|
return new Java8TimeDialect(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
|
@ConditionalOnClass({ Servlet.class }) |
|
|
|
|
@ConditionalOnWebApplication |
|
|
|
|
|