Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Component
- public class ApplicationSpringContext implements ApplicationContextAware {
- private static ApplicationContext context;
- public static MessagingService getMessagingService () {
- return (MessagingService ) context.getBean("messageService");
- }
- @Override
- public void setApplicationContext(ApplicationContext context)
- throws BeansException {
- ApplicationSpringContext.context = context;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement