Change log messages to use singular or plural instead of "noun(s)"

See gh-37017
This commit is contained in:
teacmity
2023-08-17 12:52:15 +00:00
committed by Andy Wilkinson
parent ef59326b44
commit c6c7fbc15f
6 changed files with 19 additions and 10 deletions

View File

@@ -62,8 +62,9 @@ public class FreeMarkerAutoConfiguration {
if (logger.isWarnEnabled() && this.properties.isCheckTemplateLocation()) {
List<TemplateLocation> locations = getLocations();
if (locations.stream().noneMatch(this::locationExists)) {
logger.warn("Cannot find template location(s): " + locations + " (please add some templates, "
+ "check your FreeMarker configuration, or set "
String suffix = (locations.size() == 1) ? "" : "s";
logger.warn("Cannot find template location" + suffix + ": " + locations
+ " (please add some templates, " + "check your FreeMarker configuration, or set "
+ "spring.freemarker.check-template-location=false)");
}
}