springBoot项目常用maven依赖以及依赖说明
springBoot项目常用maven依赖以及依赖说明
1:maven-compiler-plugin
<build>
<plugins>
<!-- 指定maven编译的jdk版本,如果不指定,maven3默认用jdk 1.5 maven2默认用jdk1.3 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<!-- 一般而言,target与source是保持一致的,但是,有时候为了让程序能在其他版本的jdk中运行(对于低版本目标jdk,源代码中不能使用低版本jdk中不支持的语法),会存在target不同于source的情况 -->
<source>1.8</source> <!-- 源代码使用的JDK版本 -->
<target>1.8</target> <!-- 需要生成的目标class文件的编译版本 -->
<encoding>UTF-8</encoding><!-- 字符集编码 -->
<skipTests>true</skipTests><!-- 跳过测试 -->
<verbose>true</verbose>
<showWarnings>true</showWarnings>
<fork>true</fork><!-- 要使compilerVersion标签生效,还需要将fork设为true,用于明确表示编译版本配置的可用 -->
</configuration>
</plugins>
</build>
2:spring-boot-maven-plugin
Spring Boot Maven plugin能够将Spring Boot应用打包为可执行的jar或war文件,然后以通常的方式运行Spring Boot应用。
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.0.1.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!--操作数据库-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!-- Druid 数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.5</version>
</dependency>
<!--mysql连接-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.1</version>
</dependency>
<!-- MyBatis 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.10</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--配置文件xml或properties、yml处理器,与实体对象中的属性进行绑定-->
<dependency>
<groupId> org.springframework.boot </groupId>
<artifactId> spring-boot-configuration-processor </artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
..........
springBoot项目常用maven依赖以及依赖说明的更多相关文章
- 记一次springboot项目,maven引发的悲剧(Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletCont)
maven下载大的项目的时候,jar包下载出错是常见的, 但是这种情况经常能看到,如java.lang.ClassNotFoundException这样的提示, 所以一直以来也觉得maven下载jar ...
- java(基于springboot项目或maven项目均可) 操作mongodb
一.引入mongodb 坐标依赖<dependency> <groupId>org.mongodb</groupId> <artifactId>mong ...
- idea创建web项目,springboot项目,maven项目
web项目搭建 https://www.cnblogs.com/jxldjsn/p/8203859.html
- springboot项目用maven打jar包
clean package -Dmaven.test.skip=true idea eclipse STS
- springboot 多模块 maven 项目构建jar 文件配置
最近在写 springboot 项目时,需要使用多模块,遇到了许多问题. 1 如果程序使用了 java8 的一些特性,springboot 默认构建工具不支持.需要修改配置 ... </buil ...
- SpringBoot+Spring常用注解总结
为什么要写这篇文章? 最近看到网上有一篇关于 SpringBoot 常用注解的文章被转载的比较多,我看了文章内容之后属实觉得质量有点低,并且有点会误导没有太多实际使用经验的人(这些人又占据了大多数). ...
- 第一个springboot项目
公司最近的项目在使用springboot和springcloud中的一些组件,刚开始就是主要写一些业务代码,并不了解具体要去怎么配置等,所以最近刚好有时间,就学习学习,记录总结一下,初学,欢迎指正. ...
- 【API知识】SpringBoot项目中@EnableXXX的原理
@EnableXX注解的使用场景 SpringBoot为开发人员提供了很多便利,例如如果想要定时功能,只要添加@EnableSchedule,即可配合@Schedule注解实现定时任务功能,不需要额外 ...
- IDEA 导入Springboot 项目:
更多精彩关注公众号: IDEA 导入Springboot 项目: 1. 菜单->File->New->Project From Existing Sources 2. 选中项目中的p ...
随机推荐
- linux中文件IO
一. linux常用文件IO接口 1.1. 文件描述符 1.1.1. 文件描述符的本质是一个数字,这个数字本质上是进程表中文件描述符表的一个表项,进程通过文件描述符作为index去索引查表得到文件表指 ...
- [多校联考2019(Round 5 T3)]青青草原的表彰大会(dp+组合数学)
[多校联考2019(Round 5)]青青草原的表彰大会(dp+组合数学) 题面 青青草原上有n 只羊,他们聚集在包包大人的家里,举办一年一度的表彰大会,在这次的表彰大会中,包包大人让羊们按自己的贡献 ...
- ACdream 1424 Diversion( 树链剖分 )
Diversion Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) Submit St ...
- 剑指offer-二叉搜索树的第k个结点树-python
二叉查找树(Binary Search Tree),(又:二叉搜索树,二叉排序树)它或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值: 若它的 ...
- 45. Jump Game II (JAVA)
Given an array of non-negative integers, you are initially positioned at the first index of the arra ...
- DRF之Jwt 实现自定义和DRF小组件及django-filter插件的使用
一.DRF之Jwt 实现自定义 二.DRF(过滤,排序,分页)组件 三.Django-filter插件的使用和自定义 """ 1.drf-jwt手动签发与校验 :只是做t ...
- Nginx 编译安装工程优化
1.减小 nginx 编译后的文件大小 在编译 nginx 时,默认以 debug 模式进行,在 debug 模式下会插入很多跟踪和 assert 之类的信息. 在 nginx 源码文件解压后,找到源 ...
- 下载放在resource下面的excel文件
1.将excel文件放项目resources目录下 2.打包的时候排除指定后缀文件,否则打包时会出现文件损坏的情况 <configuration> <encoding>UTF- ...
- POI2012 ODL-Distance
链接P3532 [POI2012]ODL-Distance 设\(f_{i,j}\)表示他给定的函数,\(g_i\)表示\(i\)的质因数个数 那么\[f_{i,j}=g_{\frac {i*j}{g ...
- vue组件结构
1.组件结构 2.项目结构