Add ViewResolver docs

This commit is contained in:
Dave Syer
2014-03-04 22:17:50 +00:00
parent 3bc37ddde0
commit b56bd0a10c
3 changed files with 71 additions and 13 deletions

View File

@@ -20,6 +20,7 @@ import java.util.Collections;
import java.util.Locale;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
@@ -93,6 +94,16 @@ public class ThymeleafAutoConfigurationTests {
this.context.refresh();
}
@Test
@Ignore("Fix this for gh-424")
public void templateLocationEmpty() throws Exception {
EnvironmentTestUtils.addEnvironment(this.context,
"spring.thymeleaf.prefix:classpath:/templates/empty-directory/");
this.context.register(ThymeleafAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();
}
@Test
public void createLayoutFromConfigClass() throws Exception {
AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
<definition name="*" template="layout">
<put-attribute name="content" value="content/{1}" />
<put-attribute name="title" value="title/{1}" />
</definition>
<definition name="content/*" template="{1} :: content" />
<definition name="title/*" template="{1} :: title" />
</tiles-definitions>