美文网首页
Java Web Maven初始化项目时 依赖添加

Java Web Maven初始化项目时 依赖添加

作者: KeepOnline | 来源:发表于2021-03-31 13:35 被阅读0次
  • 1.配置程序入口 (@SpringBootApplication)
  • 2.添加相关依赖和基本配置

更新ing...


<parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>2.4.4</version>
</parent>

  <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <druid.version>1.2.1</druid.version>
      <mybatis-plus.version>3.4.1</mybatis-plus.version>
  </properties>

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

<!--        数据库 -->
      <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
      </dependency>
      <dependency>
          <groupId>com.alibaba</groupId>
          <artifactId>druid-spring-boot-starter</artifactId>
          <version>${druid.version}</version>
      </dependency>
      <dependency>
          <groupId>com.baomidou</groupId>
          <artifactId>mybatis-plus-boot-starter</artifactId>
          <version>${mybatis-plus.version}</version>
      </dependency>

<!--        DEBUG-->
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-configuration-processor</artifactId>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok</artifactId>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-devtools</artifactId>
          <scope>provided</scope>
      </dependency>


<!--        单元测试-->
      <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <scope>test</scope>
      </dependency>
  </dependencies>

相关文章

网友评论

      本文标题:Java Web Maven初始化项目时 依赖添加

      本文链接:https://www.haomeiwen.com/subject/duwohltx.html