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

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

<mirror>
    <id&gt;nexus-aliyun</id&gt;
    <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&amp;characterEncoding=utf-8&amp;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语句

原文地址:https://blog.csdn.net/lylovejava0/article/details/129686203

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_15469.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注