Merge branch '3.2.x'
This commit is contained in:
commit
107dc5338b
|
@ -93,7 +93,7 @@ public class GsonAutoConfiguration {
|
||||||
map.from(properties::getFieldNamingPolicy).to(builder::setFieldNamingPolicy);
|
map.from(properties::getFieldNamingPolicy).to(builder::setFieldNamingPolicy);
|
||||||
map.from(properties::getPrettyPrinting).whenTrue().toCall(builder::setPrettyPrinting);
|
map.from(properties::getPrettyPrinting).whenTrue().toCall(builder::setPrettyPrinting);
|
||||||
map.from(properties::getLenient).whenTrue().toCall(builder::setLenient);
|
map.from(properties::getLenient).whenTrue().toCall(builder::setLenient);
|
||||||
map.from(properties::getDisableHtmlEscaping).whenFalse().toCall(builder::disableHtmlEscaping);
|
map.from(properties::getDisableHtmlEscaping).whenTrue().toCall(builder::disableHtmlEscaping);
|
||||||
map.from(properties::getDateFormat).to(builder::setDateFormat);
|
map.from(properties::getDateFormat).to(builder::setDateFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,7 @@ class GsonAutoConfigurationTests {
|
||||||
void withDisableHtmlEscapingTrue() {
|
void withDisableHtmlEscapingTrue() {
|
||||||
this.contextRunner.withPropertyValues("spring.gson.disable-html-escaping:true").run((context) -> {
|
this.contextRunner.withPropertyValues("spring.gson.disable-html-escaping:true").run((context) -> {
|
||||||
Gson gson = context.getBean(Gson.class);
|
Gson gson = context.getBean(Gson.class);
|
||||||
assertThat(gson.htmlSafe()).isTrue();
|
assertThat(gson.htmlSafe()).isFalse();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ class GsonAutoConfigurationTests {
|
||||||
void withDisableHtmlEscapingFalse() {
|
void withDisableHtmlEscapingFalse() {
|
||||||
this.contextRunner.withPropertyValues("spring.gson.disable-html-escaping:false").run((context) -> {
|
this.contextRunner.withPropertyValues("spring.gson.disable-html-escaping:false").run((context) -> {
|
||||||
Gson gson = context.getBean(Gson.class);
|
Gson gson = context.getBean(Gson.class);
|
||||||
assertThat(gson.htmlSafe()).isFalse();
|
assertThat(gson.htmlSafe()).isTrue();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue