困惑
在查看某个类的源码的时,类中方法、属性非常多,如何快速定位和查看自己想要的方法和属性呢?
解决
在 IntelliJ IDEA 中,Structure 工具窗口用于显示当前文件的代码结构(如类的方法、属性等)。对于 XML 文件(如 MyBatis 的 Mapper 文件),Structure 窗口会显示 XML 的节点结构。
方式一:使用快捷键
- Windows/Linux:按 Alt + 7
- macOS:按 Command + 7

方式二:通过菜单栏
- 点击顶部菜单栏的 View
- 选择 Tool Windows
- 点击 Structure
