Dependency org.springframework:spring-webmvc:5.0.2.RELEASE not found

今天在idea中新建springmvc的web工程出现了以下问题

Dependency org.springframework:spring-webmvc:5.0.2.RELEASE not found
依赖爆红,始终无法导入

后经排查问题出在新建工程后maven本地仓库自动设置为了默认.m2\repository仓库,如果自己在配置maven时更改过本地仓库,要再次在设置里更改为修改后的本地仓库地址

点击file下settings

Dependency org.springframework:spring-webmvc:5.0.2.RELEASE not found
Dependency org.springframework:spring-webmvc:5.0.2.RELEASE not found

如上改为修改过的本地仓库后点击ok保存设置,爆红问题解决