快捷搜索: 王者荣耀 脱发

如何设置Idea自动导包,且不让导入xxxx.*?

快捷键ctrl + alt + O
    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;

搞定!

快捷键ctrl + alt + O 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; 搞定!
经验分享 程序员 微信小程序 职场和发展