Could not find artifact org.springframework.boot:spring-boot-starter-parent

项目一直用的好好,突然出这spring-boot-starter-parent 这个找不到了,通过这几天的改动,发现修改过maven的setting.xml ,由于添加了其他的仓库地址,,把仓库地址修改好,重新Reload project 之后就没问题了,下面是我的setting.xml配置

下面是一个基础Springboot 配置信息,可以满足正常小项目开发

<mirror>
    <id>nexus-aliyun</id>
    <mirrorOf>central</mirrorOf>
    <name>Nexus aliyun</name>
    <url>https://maven.aliyun.com/nexus/content/groups/public</url>
 </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>
        <id>jdk-19</id>    
        <activation>    
            <activeByDefault>true</activeByDefault>    
            <jdk>19</jdk>    
        </activation>    
        <properties>    
            <maven.compiler.source>19</maven.compiler.source>    
            <maven.compiler.target>19</maven.compiler.target>    
            <maven.compiler.compilerVersion>19</maven.compiler.compilerVersion>    
        </properties>    
    </profile> 

pom.xml 配置,这个一基础的配置,只引入springboot ,数据库驱动,前端框架layui ,thymeleaf 模板引擎

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.jm</groupId>
    <artifactId>first</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>first</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>19</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!--引入aop包-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>3.0.1</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.20</version>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>webjars-locator</artifactId>
            <version>0.45</version>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>jquery</artifactId>
            <version>3.5.1</version>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>layui</artifactId>
            <version>2.5.7</version>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

appliaction.yml

server:
  port:80

spring:
datasource:
username: root
password: 123456
url: jdbc:mysql://localhost:3306/goods?userUnicode=true&characterEncoding=utf-8&serverTimezone=UTC
driver-class-name: com.mysql.jc.Driver
#com.mysql.jdbc.Driver
  thymeleaf:
cache: false
    encoding: UTF-8
mode: HTMLapp
prefix: classpath:/templates/
suffix: .html
mybatis:
mapper-locations: classpath*:mapper/*.xml
#type-aliases-package: com.jm.first.mapper
  configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl   #用于控制台打印sql语句

猜你喜欢

转载自blog.csdn.net/lylovejava0/article/details/129686203