maven中dependency的属性(依赖)配置

2022年12月3日11:55:18
  1. 在pom.xml中添加下面代码来下载servlet-api:
<dependency>  
    <groupId>javax.servlet</groupId>  
    <artifactId>servlet-api</artifactId>  
    <version>2.5</version>  
    <scope>provided</scope>  
</dependency>
  1. pom.xml中添加支持web的模块:
<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
 </dependency>
  1. pom.xml中添加支持springBoot热启动
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
   </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <fork>true</fork>
            </configuration>
        </plugin>
   </plugins>
</build>
  1. pom.xml中添加mysql
     <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
    </dependency>
  1. pom.xml中添加spring data jpa
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
  1. pom.xml中添加geronimo-jta_1.1_spec
<dependency>
		    <groupId>org.apache.geronimo.specs</groupId>
		    <artifactId>geronimo-jta_1.1_spec</artifactId>
		    <version>1.1.1</version>
</dependency>
  • 作者:帅帅的猪头
  • 原文链接:https://blog.csdn.net/guolf521/article/details/86642099
    更新时间:2022年12月3日11:55:18 ,共 1109 字。