springboot导入依赖

2023-02-18 00:00:00 导入 依赖 springboot
  • 请记住一条,springboot大部分已经集成好了只需要在pom.xml使用相应的依赖即可

  • 这里我给大家一个示例
    《springboot导入依赖》

    <?xml version=”1.0″ encoding=”UTF-8″?>

    4.0.0

    org.springframework.boot
    spring-boot-starter-parent
    2.1.6.RELEASE

    com.example
    demo
    0.0.1-SNAPSHOT
    demo
    Demo project for Spring Boot

    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>
        <!--导入jpa依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!--mysql连接-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    
    原文作者:普通网友
    原文地址: https://blog.csdn.net/m0_67392409/article/details/123798698
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。

相关文章