Package org.springframework.context
Interface MessageSourceAware
- All Superinterfaces:
Aware
- All Known Implementing Classes:
ResponseEntityExceptionHandler
,ResponseEntityExceptionHandler
,ResponseStatusExceptionResolver
Interface to be implemented by any object that wishes to be notified of the
MessageSource
(typically the ApplicationContext) that it runs in.
Note that the MessageSource
can usually also be passed in as a bean
reference (via arbitrary bean properties or constructor arguments), because
it is defined as a bean with name "messageSource"
in the application
context.
- Since:
- 1.1.1
- Author:
- Juergen Hoeller, Chris Beams
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setMessageSource
(MessageSource messageSource) Set theMessageSource
that this object runs in.
-
Method Details
-
setMessageSource
Set theMessageSource
that this object runs in.Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked before ApplicationContextAware's setApplicationContext.
- Parameters:
messageSource
- message source to be used by this object
-