SpringBoot配置属性系列

另外附上个人关于springboot的一些文章

SpringBoot支持了两种数据库迁移工具,一个是flyway,一个是liquibase。其本身也支持sql script,在初始化数据源之后执行指定的脚本。

flyway

  • flyway.baseline-description
    对执行迁移时基准版本的描述.

  • flyway.baseline-on-migrate
    当迁移时发现目标schema非空,而且带有没有元数据的表时,是否自动执行基准迁移,默认false.

  • flyway.baseline-version
    开始执行基准迁移时对现有的schema的版本打标签,默认值为1.

  • flyway.check-location
    检查迁移脚本的位置是否存在,默认false.

  • flyway.clean-on-validation-error
    当发现校验错误时是否自动调用clean,默认false.

  • flyway.enabled
    是否开启flywary,默认true.

  • flyway.encoding
    设置迁移时的编码,默认UTF-8.

  • flyway.ignore-failed-future-migration
    当读取元数据表时是否忽略错误的迁移,默认false.

  • flyway.init-sqls
    当初始化好连接时要执行的SQL.

  • flyway.locations
    迁移脚本的位置,默认db/migration.

  • flyway.out-of-order
    是否允许无序的迁移,默认false.

  • flyway.password
    目标数据库的密码.

  • flyway.placeholder-prefix
    设置每个placeholder的前缀,默认${.

  • flyway.placeholder-replacement
    placeholders是否要被替换,默认true.

  • flyway.placeholder-suffix
    设置每个placeholder的后缀,默认}.

  • flyway.placeholders.[placeholder name]
    设置placeholder的value

  • flyway.schemas
    设定需要flywary迁移的schema,大小写敏感,默认为连接默认的schema.

  • flyway.sql-migration-prefix
    迁移文件的前缀,默认为V.

  • flyway.sql-migration-separator
    迁移脚本的文件名分隔符,默认__

  • flyway.sql-migration-suffix
    迁移脚本的后缀,默认为.sql

  • flyway.table
    flyway使用的元数据表名,默认为schema_version

  • flyway.target
    迁移时使用的目标版本,默认为latest version

  • flyway.url
    迁移时使用的JDBC URL,如果没有指定的话,将使用配置的主数据源

  • flyway.user
    迁移数据库的用户名

  • flyway.validate-on-migrate
    迁移时是否校验,默认为true.

liquibase

    • liquibase.change-log
      Change log 配置文件的路径,默认值为classpath:/db/changelog/db.changelog-master.yaml

    • liquibase.check-change-log-location
      是否坚持change log的位置是否存在,默认为true.

    • liquibase.contexts
      逗号分隔的运行时context列表.

    • liquibase.default-schema
      默认的schema.

    • liquibase.drop-first
      是否首先drop schema,默认为false

    • liquibase.enabled
      是否开启liquibase,默认为true.

    • liquibase.password
      目标数据库密码

    • liquibase.url
      要迁移的JDBC URL,如果没有指定的话,将使用配置的主数据源.

    • liquibase.user
      目标数据用户名

SpringBoot配置属性之Migration的更多相关文章

  1. SpringBoot配置属性之Server

    SpringBoot配置属性系列 SpringBoot配置属性之MVC SpringBoot配置属性之Server SpringBoot配置属性之DataSource SpringBoot配置属性之N ...

  2. SpringBoot配置属性转载地址

    SpringBoot配置属性系列 SpringBoot配置属性之MVC SpringBoot配置属性之Server SpringBoot配置属性之DataSource SpringBoot配置属性之N ...

  3. SpringBoot配置属性之其他

    SpringBoot配置属性系列 SpringBoot配置属性之MVC SpringBoot配置属性之Server SpringBoot配置属性之DataSource SpringBoot配置属性之N ...

  4. SpringBoot配置属性之Security

    SpringBoot配置属性系列 SpringBoot配置属性之MVC SpringBoot配置属性之Server SpringBoot配置属性之DataSource SpringBoot配置属性之N ...

  5. SpringBoot配置属性之MQ

    SpringBoot配置属性系列 SpringBoot配置属性之MVC SpringBoot配置属性之Server SpringBoot配置属性之DataSource SpringBoot配置属性之N ...

  6. SpringBoot配置属性之NOSQL

    SpringBoot配置属性系列 SpringBoot配置属性之MVC SpringBoot配置属性之Server SpringBoot配置属性之DataSource SpringBoot配置属性之N ...

  7. SpringBoot配置属性之MVC

    SpringBoot配置属性系列 SpringBoot配置属性之MVC SpringBoot配置属性之Server SpringBoot配置属性之DataSource SpringBoot配置属性之N ...

  8. SpringBoot配置属性二

    server配置 server.address指定server绑定的地址 server.compression.enabled是否开启压缩,默认为false. server.compression.e ...

  9. SpringBoot配置属性之Server参数

    server配置server.address指定server绑定的地址 server.compression.enabled是否开启压缩,默认为false. server.compression.ex ...

随机推荐

  1. mysql忘记密码解决方法

    在windows下:打开命令行窗口,停止mysql服务: net stop mysql 启动mysql,执行: mysqld -nt --skip-grant-tables 另外打开一个命令行窗口,执 ...

  2. [RxJS] Build your own RxJS

    JavaScript has multiple APIs that use callback functions that all do nearly the same thing with slig ...

  3. 浅谈压缩感知(十五):感知矩阵之spark常数

    在压缩感知中,有一些用来评价感知矩阵(非测量矩阵)的指标,如常见的RIP等,除了RIP之外,spark常数也能够用来衡量能否成为合适的感知矩阵. 0.相关概念与符号 1.零空间条件NULL Space ...

  4. VC++导出具有命名空间的函数

    问题现象 原因分析 解决的方法 1 问题现象 导出具有命名空间的函数和类.源码例如以下: 头文件MiniMFC.h namespace MiniMFC { __declspec(dllexport) ...

  5. 用一条sql取得第10到第20条的记录

    因为id可能不是连续的,所以不能用取得10<id<20的记录的方法. 有三种方法可以实现:一.搜索前20条记录,指定不包括前10条语句:select top 20 * from tbl w ...

  6. 数据对接—kettle使用之四

    上一篇介绍了表输出插件,并通过实例介绍插件的简单使用,如果有这样的需求大家可以参考一下并深入研究插件的其它细节设置.这一篇我们介绍和表输出对应的插件(表输入)的使用. 表输入: 1. 从步骤插入数据: ...

  7. java zxing生成二维码

    package zxing.test; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; i ...

  8. 安装vmware-tools出错:Execution aborted!!!

    环境:VMware10+RedHat5(安装时选择了虚拟化组件). 安装vmware-tools过程中出现如下所示错误: This configuration program is to be exe ...

  9. 关于inode&硬连接

    这两天看了一道面试题,什么是inode?我勒个去,第一次听说.于是Google了一下,发现下面这段内容讲解的非常不错,供大家参考. 一.inode是什么? 理解inode,要从文件储存说起.文件储存在 ...

  10. 通过 Apache Commons HttpClient 发送 HTTPS 请求

    1.通过 HTTPS 发送 POST 请求: 2.HTTPS 安全协议采用 TLSv1.2: 3. 使用代理(Proxy)进行 HTTPS 访问: 4.指定 Content-Type 为:applic ...