步骤:
File -> Settings -> Editor -> Inspections -> 列表选择Java -> Declaration redundancy -> Declaration access can be weaker后面的勾去掉,Apply,OK。
修改IDEA默认设置:
File -> Other Settings -> Default Settings -> Editor -> Inspections -> 列表选择Java -> Declaration redundancy -> Declaration access can be weaker后面的勾去掉,Apply,OK。