方法1、 重新导入下包 maven---reimport

方法2、 清除缓存(需要重启IDEA)

链接:

https://blog.csdn.net/hlf1203/article/details/79854039