zoukankan      html  css  js  c++  java
  • springboot中常用的依赖

    <?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>
       springboot项目创建必须继承父类 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.0.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>
       GAV坐标 <groupId>com.offcn</groupId> <artifactId>springbootdemo</artifactId> <version>0.0.1-SNAPSHOT</version> <name>springbootdemo</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies>
         springboot必须有的两个依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> <!--lombok依赖代替实体类中方法的 --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.10</version> </dependency>

          
    webjars依赖,解决了静态资源更新时,路径改变的问题
    <dependency> <groupId>org.webjars</groupId> <artifactId>webjars-locator-core</artifactId> </dependency>

    swagger2生成文档的两个依赖
    <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.7.0</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.7.0</version> </dependency>
    springboot整合mybatis依赖
    <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.0.0</ve
    springboot整合spring data jpa依赖包
    <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency>
    支持freemark模板引擎
    <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freemarker</artifactId> </dependency>
        </dependencies>
    
     解决BindingException异常的
    <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.*</include> </includes> <filtering>false</filtering> </resource> </resources> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>

  • 相关阅读:
    网络多线程 ---实现网络负载图片
    optimizer for eclipse--Eclipse优化,让你的Eclipse快来飞!
    ORACLE AUTOMATIC STORAGE MANAGEMENT翻译-第二章 ASM instance(1)
    IOS 开展 分别制定了iphone 和 ipad 好? 或开发一个 Universal好?
    DevExpress VCL 2014.1.2 for C++BUILDER XE6
    swift http请求返回json数据和分析
    Spark里面的任务调度:离SparkContext开始
    ftk学习记录(一个进度条文章)
    Appium Android Bootstrap控制源代码的分析AndroidElement
    别忽视了业绩比较基准
  • 原文地址:https://www.cnblogs.com/xiaoyuer0506/p/11802960.html
Copyright © 2011-2022 走看看