升级前使用的版本:
- spring.cloud:Hoxton.SR8
- spring-cloud-alibaba:2.2.4.RELEASE
- spring-boot:2.3.2.RELEASE
升级至:
- spring.cloud:2020.0.0
- spring-cloud-alibaba:2021.1
- spring-boot:2.4.2
遇到的问题:
java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@3a0d172f has not been refreshed yet
at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1146) ~[spring-context-5.3.3.jar:5.3.3]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1158) ~[spring-context-5.3.3.jar:5.3.3]
at org.springframework.context.event.ApplicationListenerMethodAdapter.getTargetBean(ApplicationListenerMethodAdapter.java:339) ~[spring-context-5.3.3.jar:5.3.3]
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:304) ~[spring-context-5.3.3.jar:5.3.3]
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:197) ~[spring-context-5.3.3.jar:5.3.3]
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:160) ~[spring-context-5.3.3.jar:5.3.3]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) [spring-context-5.3.3.jar:5.3.3]
at org.springframework.context.event.SimpleApplicationEventMulticaster.in