Intellij: Go to autowired bean definition

后端 未结 2 708
灰色年华
灰色年华 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 05:58

    First install spring plugin by Ctrl+Alt+S under IDE Settings, select Plugins. In the right-hand part of the dialog, on the Plugins page, type spring in the search box. If the check box to the left of Spring Support is not selected, select it. If you are going to use particular Spring frameworks (Spring Security, Spring Integration, etc.), make sure that the check boxes next to their names are also selected.

    Then the icons on the left(near the code line-number) helps to identify the bean definition

提交回复
热议问题