IDEA中maven项目导入spring依赖报错。
如图,下载相应版本的jar包一直是红色的(圈出来的部分,这是我修改后的)。
Dependency 'org.springframework:spring-context:5.0.2.RELEASE' not found
其实在这之前,包括导入mysql依赖等,也会出现无法下载资源。
解决办法
File → Setting → Maven,如图所示。
最后,选择项目的pom.xml 右键maven → Download sources.