我知道如何使用类似
之类的东西创建JMS支持的频道import pickle
import redis
r = redis.StrictRedis('localhost')
mydict = {1:2,2:3,3:4}
p_mydict = pickle.dumps(mydict)
r.set('mydict',p_mydict)
read_dict = r.get('mydict')
yourdict = pickle.loads(read_dict)
我想知道如何使用Spring Java Config创建它。
答案 0 :(得分:1)
@Bean
public JmsChannelFactoryBean ticketChannel() {
JmsChannelFactoryBean fb = new JmsChannelFactoryBean(true);
fb.setConnectionFactory(connectionFactory());
fb.setDestinationName("ticket.queue");
// other props as needed.
return fb;
}