I am using http://java.sun.com/jsp/jstl/fmt tag library for outputting messages from Message Resource Bundle which is set up in Spring configuration. Also message resolving can go in Controllers.
I would like to log situations when the keys are not found in resource bundle file.
Does any body know how to do it?
Spring uses a
MessageSourceto retrieve the messages so one solution could be to write your ownMessageSourcethat encapsulate the Spring one and overwrite thegetMessagemethods to insert your logging.Something like the following (not tested):
with the class:
I don’t know if some methods are calling the other ones so you will have to experiment a bit.