From 67d67b02dd4d2c31c5c50e134a0b43285b498d1c Mon Sep 17 00:00:00 2001 From: javahongxi Date: Sat, 26 Jan 2019 17:44:50 +0800 Subject: [PATCH] optimise --- .../whatsmars/rocketmq/boot/consumer/MyConsumer3.java | 2 +- .../java/org/hongxi/whatsmars/spring/boot/App.java | 6 ------ .../src/main/resources/spring/dubbo_consumer.xml | 10 ---------- 3 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 whatsmars-spring-boot/src/main/resources/spring/dubbo_consumer.xml diff --git a/whatsmars-mq/whatsmars-mq-rocketmq/src/main/java/org/hongxi/whatsmars/rocketmq/boot/consumer/MyConsumer3.java b/whatsmars-mq/whatsmars-mq-rocketmq/src/main/java/org/hongxi/whatsmars/rocketmq/boot/consumer/MyConsumer3.java index 9775c623..4b8ab83f 100644 --- a/whatsmars-mq/whatsmars-mq-rocketmq/src/main/java/org/hongxi/whatsmars/rocketmq/boot/consumer/MyConsumer3.java +++ b/whatsmars-mq/whatsmars-mq-rocketmq/src/main/java/org/hongxi/whatsmars/rocketmq/boot/consumer/MyConsumer3.java @@ -13,7 +13,7 @@ import org.springframework.stereotype.Service; @ConditionalOnProperty(prefix = "trade.mq", value = {"nameServer"}) @Slf4j @Service -@RocketMQMessageListener(nameServer = "${trade.mq.nameServer}", instanceName = "${trade.mq.nameServer}", topic = "test-topic-3", consumerGroup = "my-consumer_test-topic-3") +@RocketMQMessageListener(nameServer = "${trade.mq.nameServer}", instanceName = "${trade.mq.clusterName}", topic = "test-topic-3", consumerGroup = "my-consumer_test-topic-3") public class MyConsumer3 implements RocketMQListener { public void onMessage(String message) { log.info("received message: " + message); diff --git a/whatsmars-spring-boot/src/main/java/org/hongxi/whatsmars/spring/boot/App.java b/whatsmars-spring-boot/src/main/java/org/hongxi/whatsmars/spring/boot/App.java index 8e91a4e6..8d1321f7 100644 --- a/whatsmars-spring-boot/src/main/java/org/hongxi/whatsmars/spring/boot/App.java +++ b/whatsmars-spring-boot/src/main/java/org/hongxi/whatsmars/spring/boot/App.java @@ -1,11 +1,7 @@ package org.hongxi.whatsmars.spring.boot; -import org.hongxi.whatsmars.spring.boot.config.UserConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.ImportResource; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; @@ -14,8 +10,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableAsync @EnableScheduling @SpringBootApplication -@EnableConfigurationProperties({UserConfig.class}) -@ImportResource(locations={"classpath*:spring/*.xml"}) public class App { public static void main(String[] args) { diff --git a/whatsmars-spring-boot/src/main/resources/spring/dubbo_consumer.xml b/whatsmars-spring-boot/src/main/resources/spring/dubbo_consumer.xml deleted file mode 100644 index 9a41261d..00000000 --- a/whatsmars-spring-boot/src/main/resources/spring/dubbo_consumer.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file -- GitLab