thymeleaf-spring
thymeleaf-spring copied to clipboard
Customizable absent message representation
Currently, the absent message representation is built by StandardMessageResolver
which is statically injected into SpringMessageResoler
constructor:
https://github.com/thymeleaf/thymeleaf-spring/blob/4eb8dc1f7eb6950764eeeeded3498261c1537671/thymeleaf-spring5/src/main/java/org/thymeleaf/spring5/messageresolver/SpringMessageResolver.java#L69
A way to customize the absent message representation should be provided.
Workaround: custom MessageSource
that instead of returning null
when message is not found, will return some magic custom string that means message not exists.