Well-known names for beans in message broker XML config

Issue: SPR-15068
This commit is contained in:
Rossen Stoyanchev
2017-01-17 17:08:45 -05:00
parent be45de0571
commit 2e414ab25a
2 changed files with 15 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -333,10 +333,12 @@ public class MessageBrokerBeanDefinitionParserTests {
assertNotNull(messageConverter);
assertTrue(messageConverter instanceof CompositeMessageConverter);
CompositeMessageConverter compositeMessageConverter = this.appContext.getBean(CompositeMessageConverter.class);
String name = MessageBrokerBeanDefinitionParser.MESSAGE_CONVERTER_BEAN_NAME;
CompositeMessageConverter compositeMessageConverter = this.appContext.getBean(name, CompositeMessageConverter.class);
assertNotNull(compositeMessageConverter);
SimpMessagingTemplate simpMessagingTemplate = this.appContext.getBean(SimpMessagingTemplate.class);
name = MessageBrokerBeanDefinitionParser.MESSAGING_TEMPLATE_BEAN_NAME;
SimpMessagingTemplate simpMessagingTemplate = this.appContext.getBean(name, SimpMessagingTemplate.class);
assertNotNull(simpMessagingTemplate);
assertEquals("/personal/", simpMessagingTemplate.getUserDestinationPrefix());