1、打开电脑中安装好一个的IntelliJ IDEA图标
3、点击了file菜单之后,弹出了下拉菜单选中为 settings 选项
5、选中左侧中的auto import选项之后,勾选上 optimize import on the fly 选项