Skip to content

Commit

Permalink
更新nacos-config-spring-boot版本,以解决Receiver被提前初始化的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
cellur committed Aug 7, 2022
1 parent 6ba128a commit 5cfefb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ public class ReceiverStart {
*/
@PostConstruct
public void init() {
int total = groupIds.size();
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++) {
for (int i = 0; i < groupIds.size(); i++) {
context.getBean(Receiver.class);
}
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>nacos-config-spring-boot-starter</artifactId>
<version>0.2.1</version>
<version>0.2.12</version>
</dependency>

<!--apollo-->
Expand Down

0 comments on commit 5cfefb5

Please sign in to comment.