Intellij: Go to autowired bean definition

后端 未结 2 707
灰色年华
灰色年华 2021-02-20 05:32

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

@Autowired 
private JdbcTemplate template;
         


        
2条回答
  •  被撕碎了的回忆
    2021-02-20 06:15

    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.

    enter image description here

提交回复
热议问题