A little help with messages.properties
Cantor, Scott
cantor.2 at osu.edu
Thu Feb 10 02:46:17 UTC 2022
Taken literally I don't see any of those values lining up with what you're trying to put in the file, even if one assumes you have entityID populated correctly. I would probably start by just echoing out those message variables you're constructing to make sure they match the keys in the file. I don't think they do.
e.g.:
#set ($header = $springMacroRequestContext.getMessage("${eventKey}-${entityID}.header", "$defaultHeader"))
That would seem to be "ContextCheckDenied-entityID.header", not "sp-example-context-check-denied.header".
> Alternatively, what logging class would I turn up to see details logging for message resolution?
I guess some Spring class maybe, but I would just echo out the message key strings (maybe assign them to a variable, echo that out, and pass the variable into the message function.
I think you just don't have the macros right, even if the basic idea is fine. You probably mean to be looking up a message "key" based on the event and entityID, and then using the message key you retrieved to construct the other message keys using those suffixes. That just doesn't look like what you're actually doing.
-- Scott
More information about the users
mailing list