更新nacos-config-spring-boot版本,以解决Receiver被提前初始化的问题

pull/13/head
kosmosr 3 years ago
parent 6ba128af29
commit 5cfefb5fbb

@ -59,13 +59,7 @@ public class ReceiverStart {
*/ */
@PostConstruct @PostConstruct
public void init() { public void init() {
int total = groupIds.size(); for (int i = 0; i < groupIds.size(); i++) {
if (nacosEnabled) {
// 当nacos开启时 会导致Receiver提前加载 所以这里getBean次数-1
// nacos issue: https://github.com/nacos-group/nacos-spring-project/issues/249
total -= 1;
}
for (int i = 0; i < total; i++) {
context.getBean(Receiver.class); context.getBean(Receiver.class);
} }
} }

@ -88,7 +88,7 @@
<dependency> <dependency>
<groupId>com.alibaba.boot</groupId> <groupId>com.alibaba.boot</groupId>
<artifactId>nacos-config-spring-boot-starter</artifactId> <artifactId>nacos-config-spring-boot-starter</artifactId>
<version>0.2.1</version> <version>0.2.12</version>
</dependency> </dependency>
<!--apollo--> <!--apollo-->

Loading…
Cancel
Save