Commit d42a2647 by QIANGLU

add provided apollo

parent 64efb55a
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
<groupId>org.apache.rocketmq</groupId> <groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId> <artifactId>rocketmq-spring-boot-starter</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-client</artifactId>
<version>1.4.0</version>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
package com.secoo.mall.mq.config; package com.secoo.mall.mq.config;
import com.ctrip.framework.apollo.spring.boot.ApolloAutoConfiguration;
import org.apache.rocketmq.acl.common.AclClientRPCHook; import org.apache.rocketmq.acl.common.AclClientRPCHook;
import org.apache.rocketmq.acl.common.SessionCredentials; import org.apache.rocketmq.acl.common.SessionCredentials;
import org.apache.rocketmq.client.AccessChannel; import org.apache.rocketmq.client.AccessChannel;
import org.apache.rocketmq.client.producer.DefaultMQProducer; import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.apache.rocketmq.spring.autoconfigure.RocketMQProperties; import org.apache.rocketmq.spring.autoconfigure.RocketMQProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.util.Assert; import org.springframework.util.Assert;
...@@ -19,6 +21,7 @@ public class MatrixRocketMQAutoonfiguration { ...@@ -19,6 +21,7 @@ public class MatrixRocketMQAutoonfiguration {
@Bean @Bean
@ConditionalOnClass(ApolloAutoConfiguration.class)
public RocketMQProperties rocketMQProperties(){ public RocketMQProperties rocketMQProperties(){
return new RocketMQProperties(); return new RocketMQProperties();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment