SpringBoot + ActiveMQ - How to set trusted packages?

后端 未结 6 954
既然无缘
既然无缘 2021-02-19 04:47

I\'m creating two springboot server & client applications communicating using JMS, and everything is working fine with the release 5.12.1 for activemq, but as s

6条回答
  •  余生分开走
    2021-02-19 05:25

    Add the following bean:

    @Bean
    public ActiveMQConnectionFactory activeMQConnectionFactory() {
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("your broker URL");
        factory.setTrustedPackages(Arrays.asList("com.my.package"));
        return factory;
    }
    

    The ability to do this via a configuration property has been added for the next release: https://github.com/spring-projects/spring-boot/issues/5631

提交回复
热议问题