ntellij IDEA 阅读源码的 4 个绝技
前段时间分享了《阅读跟踪 Java 源码的几个小技巧》是基于 Eclipse 版本的,看大家的留言都是想要 IDEA 版本的源码阅读技巧。
所以,为了满足众多 IDEA 粉丝的要求,栈长我特意做一期 IDEA 版的。
1、定位到方法实现类
public static Object getBean(String name) {
return applicationContext.getBean(name);
}
复制
如以上代码,IDEA 如何跳转到 getBean 方法的实现类?
在 IDEA 中,CTRL + 鼠标左击 默认会跳到方法所在的接口,如 getBean 就会跳到 BeanFactory 接口里面去。
想要最牛的源码?blog.bqpms.cn帮你搞定!org.springframework.beans.factory.BeanFactory
Idea激活码,直接复制即可使用
KIOPLL9UI7-eyJsaWNlbnNlSWQiOiJLRkw3TE02MDZBIiwibGljZW5zZWVOYW1lIjoi5rC45LmF5r+A5rS7IHd3d8K3YWppaHVvwrdjb20iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiIiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMi0wNy0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUFBDIiwicGFpZFVwVG8iOiIyMDIyLTA3LTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IlBXUyIsInBhaWRVcFRvIjoiMjAyMi0wNy0xNCIsImV4dGVuZGVkIjp0cnVlfSx7ImNvZGUiOiJQU0kiLCJwYWlkVXBUbyI6IjIwMjItMDctMTQiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiUENXTVAiLCJwYWlkVXBUbyI6IjIwMjItMDctMTQiLCJleHRlbmRlZCI6dHJ1ZX1dLCJtZXRhZGF0YSI6IjAxMjAyMjA2MTVQU0FNMDAwMDA1IiwiaGFzaCI6IjM0OTc3NjIzLzA6MTkyOTgwMTE3MCIsImdyYWNlUGVyaW9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