Skip to content
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

handlerMap封装bean那里有bug #4

Open
moluqianli opened this issue May 27, 2017 · 2 comments
Open

handlerMap封装bean那里有bug #4

moluqianli opened this issue May 27, 2017 · 2 comments

Comments

@moluqianli
Copy link

原代码:
String interfaceName = serviceBean.getClass().getAnnotation(RpcService.class).value().getName();
如果这个serviceBean本身是个cglibBean,你这个方法会获取不到RpcService的annotation信息的,使用Spring的AnnotationUtils可以解决

@luxiaoxun
Copy link
Owner

这部分代码只是简单的说明如何在spring中加载有RpcService annotation的bean,不涉及其他的东西。

@sxlsjf
Copy link

sxlsjf commented Sep 29, 2019

有点疑问的是,你能保证此时获得所有带RpcService的注解吗,这个方法实能保正所有bean实例都注入到容器里了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants