Skip to content

Commit f7b8356

Browse files
committed
bean loop check
1 parent e6456c6 commit f7b8356

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/tron/program/FullNode.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.tron.program;
22

33
import lombok.extern.slf4j.Slf4j;
4+
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
45
import org.springframework.context.ApplicationContext;
56
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
67
import org.tron.common.application.Application;
@@ -27,7 +28,11 @@ public static void main(String[] args) throws InterruptedException {
2728
return;
2829
}
2930

30-
ApplicationContext context = new AnnotationConfigApplicationContext(DefaultConfig.class);
31+
DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
32+
beanFactory.setAllowCircularReferences(false);
33+
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(beanFactory);
34+
context.register(DefaultConfig.class);
35+
context.refresh();
3136
Application appT = ApplicationFactory.create(context);
3237
shutdown(appT);
3338
//appT.init(cfgArgs);

0 commit comments

Comments
 (0)