首页
  • 2024.1.1.0
  • 2024.1.1.1
  • 2024.1.2.0
  • 2024.1.3.0
  • Java
  • Linux
  • Deploy
  • Application
关于
友情链接
GitHub (opens new window)

Xiao ku

板砖师傅
首页
  • 2024.1.1.0
  • 2024.1.1.1
  • 2024.1.2.0
  • 2024.1.3.0
  • Java
  • Linux
  • Deploy
  • Application
关于
友情链接
GitHub (opens new window)
  • Springboot集成redis
  • Springboot集成mongodb
  • Springboot集成FastDFS
  • Springboot集成WebSocket
  • Springboot集成kafka
  • Springboot集成Flyway
    • Yml
    • Pom
    • Sql
  • Springboot集成ScheduleTask
  • Validation数据校验规范使用
  • 常用代码
  • Java
xiaoku
2023-03-13
目录

Springboot集成Flyway

# Yml

spring:
  flyway:
    locations: classpath:db #sql文件的位置
1
2
3

# Pom

        <!-- 数据库版本管理 -->
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-mysql</artifactId>
        </dependency>
1
2
3
4
5
6
7
8
9

# Sql

根据flyway.locations 配置的位置新增文件夹及文件

V 代表版本控制,1.0 1.1代表版本号(注:V1.0 后面是 两个 _ 否则不起作用。sql语句中不能含有创建 schema_version表的信息否则报错) note

上次更新: 2023/03/13, 02:56:26
Springboot集成kafka
Springboot集成ScheduleTask

← Springboot集成kafka Springboot集成ScheduleTask→

Copyright © 2019-2024
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式