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. 2017 年度码云新增项目排行榜 TOP 50,为它们打“call”

    2017 年度码云新增项目排行榜 TOP 50 正式出炉 !2017 结束了,我们来关注一下这一年里码云上新增的最热门的开源项目吧.此榜单根据 2017 年在码云上新增开源项目的 Watch.Star ...

  2. MFC对话框:模态对话框及其弹出过程

    From: http://www.jizhuomi.com/school/c/160.html 加法计算器对话框程序大家照着做一遍后,相信对基于对话框的程序有些了解了,有个好的开始对于以后的学习大有裨 ...

  3. HttpWebRequest抓取网页数据返回异常:远程服务器返回错误: (503) 服务器不可用

      解决方法:   HttpWebRequest request = (HttpWebRequest)WebRequest.Create(webURL);                //声明一个H ...

  4. ext js/Ext.Net_演示 htmleditor 上传&插入图片

    本文内容 解决方案结构 HtmlEditor_Upload.js 脚本 HtmlEditorUploadImg.ashx 上传图片到服务器 演示 htmleditor 控件添加插入图片功能   解决方 ...

  5. 使用SqlBulkCopy类实现导入excel表格

    前言: 上篇博客介绍了SqlBulkCopy类批量操作数据库的相关操作,最后提到了可以使用这个类实现excel文件导入数据库,接下来我做简单介绍. 首先说一下思路: 把excel中的数据读出来并放入到 ...

  6. Go语言类型转换库【github.com/demdxx/gocast】的用法

    一.导入库: go get github.com/demdxx/gocast 二.测试代码: // main.go package main import ( "fmt" &quo ...

  7. Python-统计svn代码总行数

    1 #!/bin/bash/python 2 # -*-coding:utf-8-*- 3 #svn统计url代码行数脚本,过滤空行,不过滤注释. 4 5 import subprocess,os,s ...

  8. kettle实现数据库迁移----多表复制向导

    kettle实现数据库迁移----多表复制向导 需求: 做数据仓库时,需要将业务系统CRM抽取到数据仓库的缓冲层,业务系统使用的是SqlServer数据库,数据仓库的缓冲层使用的是mysql数据库,为 ...

  9. 阿里DRUID数据源

    Druid是Java语言中最好的数据库连接池.Druid能够提供强大的监控和扩展功能. https://github.com/alibaba/druid/wiki/%E5%B8%B8%E8%A7%81 ...

  10. LeetCode222 Count CompleteTree Nodes(计算全然二叉树的节点数) Java 题解

    题目: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree fr ...