Springboot所有的依赖

<properties>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!--    声明springboot的版本号 -->
    <spring-boot.version>2.2.9.RELEASE</spring-boot.version>
</properties>





    <!--  引入springboot官方提供的所有依赖的版本号定义,如果项目中使用相关依赖,可以不必写版本号了-->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
 


<dependencies>  
    
    
     <!--    引入springboot的web项目的依赖        -->
     <dependency> 
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-web</artifactId>
     </dependency>
    
    
    
     <!--    引入lombok依赖    -->
     <dependency>
         <groupId>org.projectlombok</groupId>
         <artifactId>lombok</artifactId>
     </dependency>
    
    
    

     <!-- 基于 mybatis plus 的dao层的相关依赖 start-->
    
     <dependency>
         <groupId>com.baomidou</groupId>
         <artifactId>mybatis-plus-boot-starter</artifactId>
         <version>3.5.2</version>
     </dependency>
    

     <!-- 德鲁伊启动器     -->
     <dependency>
         <groupId>com.alibaba</groupId>
         <artifactId>druid-spring-boot-starter</artifactId>
         <version>1.2.6</version>
     </dependency>

     <!--    数据库依赖-->
     <dependency>
         <groupId>mysql</groupId>
         <artifactId>mysql-connector-java</artifactId>
         <version>5.1.47</version>
     </dependency>
    
     <!-- 基于 mybatis plus 的dao层的相关依赖 end-->

    
    
	<!--  springboot测试依赖   -->
     <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-test</artifactId>
         <scope>test</scope>
     </dependency>
    
    
    
		<!--    胡图工具类依赖    -->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.8.18</version>
        </dependency>
    
    
    
  	  <!--   开发者使用,在写start里用,给使用者提供只能提示yml     -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
    
    
    
         <!--        mybatis-->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>1.3.2</version>
        </dependency>
    
    
            <!--        pageHelper分页依赖-->
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper-spring-boot-starter</artifactId>
            <version>1.2.5</version>
        </dependency>
    
    
<!--   验证码启动器     -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>kaptcha-spring-boot-starter</artifactId>
            <version>1.1.0</version>
        </dependency>
    
    
        <!--    AOP的依赖    -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>

    
    
            <!--     swagger依赖 ,两个 ,一个核心功能,一个UI可视化 -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.9.2</version>
        </dependency>
    
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.9.2</version>
        </dependency>

 <!-- https://mvnrepository.com/artifact/com.github.xiaoymin/knife4j-spring-boot-starter  小刀启动器 -->
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-spring-boot-starter</artifactId>
            <version>2.0.4</version>
        </dependency>
    
    
    <!--   mybatis-plus-generator  代码生成器   start  需要mysql依赖 -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-generator</artifactId>
            <version>3.5.2</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-freemarker</artifactId>
            <version>2.2.9.RELEASE</version>
        </dependency>
        <!--   mybatis-plus-generator  代码生成器   end -->
    
    
    
       <!--引入springboot项目的打包插件,这样打出来的jar包才是可以直接运行的jar包-->
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.2.9.RELEASE</version>
                <configuration>
                    <mainClass>com.qf.HomeWork.HomeApplication</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    
    
    
 </dependencies>

配置文件

#配置数据源
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    username: root
    password: 2001
    url: jdbc:mysql://localhost:3306/test?useSSL=true&amp;useUnicode=true&amp;characterEncoding=utf8
    type: com.alibaba.druid.pool.DruidDataSource
#日期格式json
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: GMT+8
#图片上传大小 肯定存在 MultipartProperties这个类
  servlet:
    multipart:
      #单个文件最大大小
      max-file-size: 10MB
      #全部文件总大小
      max-request-size: 50MB

#  resources:
#    static-locations: classpath:/templates
#  debug: true
#mybatis 的必要配置,配置mapperxml文件的位置 类路径包括导入所有jar包的类路径下的所有文件夹下的所有Mapper.xml为映射文件。
mybatis:
  mapper-locations: classpath*:**/*Mapper.xml
#开启mybatis的sql日志。
logging:
  level:
    com.qf.HomeWork.mapper: debug

#验证码的配置
kaptcha:
  height: 50
  width: 200
  content:
    length: 2
    source: abcdefghjklmnopqrstuvwxyz23456789
    space: 2
  font:
    color: black
    name: Arial
    size: 40
  background-color:
    from: lightGray
    to: white
  border:
    enabled: true
    color: black
    thickness: 1
#自定义验证码超时时间
qf:
  kapchar:
    timeout: 60
  fileupload:
    path: F:\pathpng\

#debug: true
server:
  port: 8080
com:
  qf:
    swagger:
      package-name: com.qf.HomeWork.controller
      contact-name: 蒋铭基
      contact-url: http://www.baidu.com
      email: 1393087444@qq.com
      title: 蒋铭基的接口API文档
      description: 这是蒋铭基项目的接口描述文档的描述信息。很棒!
      version: 1.1.0
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值