thymeleaf-spring icon indicating copy to clipboard operation
thymeleaf-spring copied to clipboard

Customizable absent message representation

Open cdalexndr opened this issue 3 years ago • 0 comments

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.

cdalexndr avatar Mar 26 '21 11:03 cdalexndr