Intellij:转到自动装配的bean定义 [英] Intellij: Go to autowired bean definition

查看:325
本文介绍了Intellij:转到自动装配的bean定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找通过Java代码中@Autowired依赖项查找bean定义的快速方法.假设我有:

I looking for quick way to find bean definition by their @Autowired dependency in java code. Suppose I have:

@Autowired 
private JdbcTemplate template;

我想让IDEA告诉我template bean的定义是在哪个xml文件中.该怎么做?

I want IDEA tell me in which xml file is the definition of template bean. How to do that?

推荐答案

如果您已安装并激活了spring插件,则应该在左侧装订线处看到一些图标,这些图标可帮助您识别已定义bean的位置,或者xml或注释.如果您有多个弹簧轮廓,则可能必须选择活动的弹簧轮廓.

If you have the spring plugin installed and active you should see some icons on the left gutter which help you to identify the place where the bean has been defined, either xml or annotation. If you have multiple spring profiles you may have to chose the active one.

这篇关于Intellij:转到自动装配的bean定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆