You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org.springframework.context.support.AbstractMessageSource allows you to choose the way missing message resources are handled by setting setUseCodeAsDefaultMessage(boolean)
true - message's code is returned instead of message
false - NoSuchMessageException is thrown
Usually in production environment you would choose the second option (fail-fast) instead of displaying page incorrectly, which is confirmed by their javadoc: "In general, it is recommended to just use "useCodeAsDefaultMessage" during development and not rely on it in production.."
However, SpringNonCacheableMessageResolver catches NoSuchMessageException and returns null, which is replaced by message code in question marks in MessageResolutionUtils.getAbsentMessageRepresentation() thus messing up the fail-fast option.
The text was updated successfully, but these errors were encountered:
org.springframework.context.support.AbstractMessageSource allows you to choose the way missing message resources are handled by setting setUseCodeAsDefaultMessage(boolean)
true - message's code is returned instead of message
false - NoSuchMessageException is thrown
Usually in production environment you would choose the second option (fail-fast) instead of displaying page incorrectly, which is confirmed by their javadoc: "In general, it is recommended to just use "useCodeAsDefaultMessage" during development and not rely on it in production.."
However, SpringNonCacheableMessageResolver catches NoSuchMessageException and returns null, which is replaced by message code in question marks in MessageResolutionUtils.getAbsentMessageRepresentation() thus messing up the fail-fast option.
The text was updated successfully, but these errors were encountered: