-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Register module ApplicationContext as sofa components #740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| application.setAppName(appName); | ||
|
|
||
| Map<String, SofaRuntimeManager> sofaRuntimeManagers = applicationContext | ||
| .getBeansOfType(SofaRuntimeManager.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为何不使用org.springframework.beans.factory.BeanFactory#getBean(java.lang.Class), 该方法抛出的异常包含了各类场景
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一块主要是新增的逻辑。。。不知道有什么异常情况,尽量不影响之前的启动逻辑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在这个类中SofaRuntimeManager获取有问题肯定是有异常原因导致的,应该直接抛出spring的异常阻止应用启动,而不是打印error日志
...-core/isle-sofa-boot/src/main/java/com/alipay/sofa/isle/stage/SpringContextInstallStage.java
Outdated
Show resolved
Hide resolved
| * | ||
| * @author khotyn Created on 2020/10/26 | ||
| */ | ||
| public class SpringComponent extends AbstractComponent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
叫SpringContextComponent是否好一点,不然以为是spring bean的component
HzjNeverStop
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fix: #667