最近关注了下idea自动导包机制
-
Add unambiguous imports on the fly:快速添加明确的导入
-
Optimize imports on the fly:快速优化导入,优化的意思即自动帮助删除无用的导入
-
效果如下:
- 有一些人对导入
*
有一些排斥嘛,怎么办?
- 把这个值调大点,再按下快捷键试试
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
搞定!