昨日还好端端的idea,今日打开,新建了一个spring boot项目,连主类都一直运行不起来!!!
初步判断是仓库下载不了需要的类,于是删除缓存、重新下载,甚至把仓库都给删了。。。。于是报了如下错误:
报错情况后来我仔细看了仓库,原来是setting有问题!!!
在这里插入图片描述解决办法:
1、找到自己的maven目录下的setting.xml:
setting.xml2、右键以文本的形式打开,找到自己的本地仓库:本地仓库3、在setting.xml中配置镜像:
于:在这里插入图片描述
添加:

<mirror>
        <id>alimaven</id>
        <name>aliyun maven</name>
        <url>https://maven.aliyun.com/repository/public</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
        <id>alimaven-central</id>
        <name>aliyun maven central</name>
        <url>https://maven.aliyun.com/repository/central</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
        <id>alimaven-spring</id>
        <name>aliyun maven-spring</name>
        <url>https://maven.aliyun.com/repository/spring</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
        <id>central</id>
        <name>Maven Repository Switchboard</name>
        <url>https://repo1.maven.org/maven2/</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
        <id>jboss-public-repository-group</id>
        <mirrorOf>central</mirrorOf>
        <name>JBoss Public Repository Group</name>
        <url>http://repository.jboss.org/nexus/content/groups/public</url>
    </mirror>
    <mirror>
        <id>spring-snapshots</id>
        <mirrorOf>central</mirrorOf>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
    </mirror>
    <mirror>
        <id>spring-milestones</id>
        <mirrorOf>central</mirrorOf>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
    </mirror>
    <mirror>
      <id>maven-default-http-blocker</id>
      <mirrorOf>external:http:*</mirrorOf>
      <name>Pseudo repository to mirror external repositories initially using HTTP.</name>
      <url>http://0.0.0.0/</url>
      <blocked>true</blocked>
    </mirror>

4、设置idea的maven:
在这里插入图片描述

GitHub 加速计划 / ma / maven
35
0
下载
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:2 天前 )
93410b37 Bumps [eu.maveniverse.maven.plugins:bom-builder3](https://github.com/maveniverse/bom-builder-maven-plugin) from 1.2.1 to 1.3.0. - [Release notes](https://github.com/maveniverse/bom-builder-maven-plugin/releases) - [Commits](https://github.com/maveniverse/bom-builder-maven-plugin/compare/release-1.2.1...release-1.3.0) --- updated-dependencies: - dependency-name: eu.maveniverse.maven.plugins:bom-builder3 dependency-version: 1.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 4 天前
5719b80d used by maven-artifact-transfer 6 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐