<!-- used versions (not defined in spring-boot) -->
<httpclient-spring-boot-starter.version>1.0-SNAPSHOT</httpclient-spring-boot-starter.version>
- <thymeproxy.version>1.0-SNAPSHOT</thymeproxy.version>
</properties>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
- <dependency>
- <groupId>de.juplo</groupId>
- <artifactId>thymeproxy</artifactId>
- <version>${thymeproxy.version}</version>
- </dependency>
<dependency>
<groupId>de.juplo</groupId>
<artifactId>httpclient-spring-boot-starter</artifactId>
return new UrlFilenameViewController();
}
+ @Bean
+ public TemplateResolver defaultTemplateResolver(
+ IResourceResolver resources,
+ Environment env
+ )
+ {
+ TemplateResolver resolver = new TemplateResolver();
+ resolver.setResourceResolver(resources);
+ resolver.setPrefix("http://localhost:8080/thymeleaf/");
+ resolver.setSuffix(".html");
+ resolver.setTemplateMode("HTML5");
+ resolver.setCharacterEncoding("UTF-8");
+ resolver.setCacheable(Boolean.valueOf(env.getProperty("thymeproxy.cacheable")));
+ return resolver;
+ }
+
+ @Bean
+ public UrlResourceResolver thymeleafResourceResolver()
+ {
+ return new UrlResourceResolver();
+ }
+
public static void main(String[] args)
{
thymeproxy.origin=@thymeproxy.origin@
server.port=@thymeproxy.port@
thymeproxy.ttl=@thymeproxy.ttl@
-thymeproxy.origins[0].uri=http://localhost:8080
-thymeproxy.origins[0].prefix=/thymeleaf/
-thymeproxy.origins[0].suffix=.html
thymeproxy.cacheable=@thymeproxy.cacheable@
logging.level.de.juplo=info