Skip to content

Commit fb2e991

Browse files
committed
Test for JSP prefix and suffix property binding in WebMvcProperties
1 parent 3ae95d6 commit fb2e991

File tree

1 file changed

+9
-0
lines changed
  • spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet

1 file changed

+9
-0
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcPropertiesTests.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ void servletPathWhenHasWildcardThrowsException() {
6161
.satisfies((ex) -> assertThat(Throwables.getRootCause(ex)).hasMessage("'path' must not contain wildcards"));
6262
}
6363

64+
@Test
65+
void jspViewPropertiesBindingCorrectly() {
66+
bind("spring.mvc.jsp.prefix", "/WEB-INF/views/");
67+
bind("spring.mvc.jsp.suffix", ".jsp");
68+
69+
assertThat(this.properties.getJsp().getPrefix()).isEqualTo("/WEB-INF/views/");
70+
assertThat(this.properties.getJsp().getSuffix()).isEqualTo(".jsp");
71+
}
72+
6473
private void bind(String name, String value) {
6574
bind(Collections.singletonMap(name, value));
6675
}

0 commit comments

Comments
 (0)