记录在使用 Flyway 管理 Oracle 数据库脚本时遇到的一些问题,Flyway 5.2.1 - 7.7.3 都存在此问题。 1. Flyway not support Oracle 11g 异常信息 Caused by: org.flywaydb.core.internal.license.FlywayEditionUpgradeRequiredException: Flyway Enterprise Edition or Oracle upgrade required: Oracle 11.2 is no longer supported by Flyway Community Edition, but still supported by Flyway Enterprise Edition. at org.flywaydb.core.internal.database.base.Database.ensureDatabaseNotOlderThanOtherwiseRecommendUpgradeToFlywayEdition(Database.java:173) at org.flywaydb.core.internal.database.oracle.OracleDatabase.ensureSupported(OracleDatabase.java:91) at org.flywaydb.core.Flyway.execute(Flyway.java:514) at org.flywaydb.core.Flyway.migrate(Flyway.java:159) at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ... 19 common frames omitted 修改 Flyway 5.2.4 OracleDatabase.java 社区版本做了版本号限制 修改 Flyway 6.5.7 OracleDatabase.
Read moreFlyway 通过 SQL Patch 脚本的方式管理数据库脚本版本,开发一段时间后会积攒大量脚本。当一个版本稳定后我们希望合并成一个全量脚本 1.首先对齐程序与数据库中的脚本版本号 查看程序中脚本版本清单,例如:程序中有三个版本的脚本 V1.0.0.0__init.sql V1.0.0.1__add_user_table.sql V1.0.0.2__modify_user_table.sql 查看数据库中历史版本记录表 (默认是 flyway_schema_history) 中执行过的脚本版本,例如: versions description script success 1.0.0.0 init.sql V1.0.0.0__init.sql 1 1.0.0.1 add_user_table.sql V1.0.0.1__add_user_table.sql 1 1.0.0.2 modify_user_table V1.0.0.2__modify_user_table.sql 1 这里只摘取了关键字段,你可以看到每个版本都已经执行,并且执行都是成功的 success=1 至此:你已经对齐了程序和数据库中脚本版本号,可以开始准备合并了 2.合并程序中的SQL脚本 合并多个脚本的内容到最大版本号的文件中,例如:将 V1.0.0.0__init.sql, V1.0.0.1__add_user_table.sql, V1.0.0.2__modify_user_table.sql 合并为 V1.0.0.2__init.sql 注意: 不是简单的文件合并,而是最终执行结果的合并 3.重新打包程序 只包含合 V1.0.0.2__init.sql 脚本的程序 4.停止所有老版本的程序 包含 V1.0.0.0__init.sql,V1.0.0.1__add_user_table.sql,V1.0.0.2__modify_user_table.sql 老脚本的程序 5.删除数据库中的版本历史表 默认是 flyway_schema_history 6.重启应用程序 在程序启动时设置基线版本参数为当前版本,设置这个参数的目的是告诉 Flyway 当前已经执行过 1.0.0.2 脚本了。这之前的脚本不要再执行了。 flyway.baseline-version=1.0.0.2 注意: 如果是空库,全新安装程序,那么则不需要设置 flyway.baseline-version 参数 7.结束 查看数据库中历史版本记录表 (默认是 flyway_schema_history) 中执行过的脚本版本,例如: versions description script success 1.
Read more常用 Maven 命令 Parameters -D 指定参数,如 -Dmaven.test.skip=true 跳过单元测试; -P 指定 Profile 配置,可以用于区分环境; -e 显示maven运行出错的信息; -o 离线执行命令,即不去远程仓库更新包; -f 强制指定使用 POM 文件,或者包含 POM 文件的目录 -pl 选项后可跟随{groupId}:{artifactId}或者所选模块的相对路径(多个模块以逗号分隔) -am 表示同时处理选定模块所依赖的模块 -amd 表示同时处理依赖选定模块的模块 -rf 表示从指定模块开始继续处理 -N 表示不递归子模块 -X 显示maven允许的debug信息; -U 强制去远程更新 snapshot的插件或依赖,默认每天只更新一次。 –no-snapshot-updates 禁止更新 snapshot Dependency 显示maven依赖数 mvn dependency:tree 显示maven依赖列表 mvn dependency:list 下载依赖包的源码 mvn dependency:sources Maven Wrapper 自动安装 maven 的包装器(适合不想手动安装Maven的用户),使用插件Maven Wrapper plugin将其自动化安装指定版本的 Maven mvn -N io.takari:maven:wrapper -Dmaven=3.6.3 这个命令会在你的项目中生成如下文件,请将这些文件与源代码一起管理 mvnw: 这是 Linux Script 可执行文件,用来代替 mvn mvnw.cmd: 这是 Windows Script 可执行文件,用来代替 mvn mvn: 隐藏的文件夹,其中包含Maven Wrapper Java库及其属性文件 首次执行 mvnw 或者 mvnw.
Read more通过单个服务器压测的 QPS 估算需要的服务器数量 已知 QPS 和期望每笔耗时,估算服务器数量 服务器数量 $$ = QPS \div (1000 \div 每笔毫秒) \div 每服务器CPU个数 $$ 例如: QPS:每秒处理3200笔 每笔毫秒:50ms 每个服务器CPU个数:16 服务器数量 $$ 3200_{qps} \div (1000_{ms} \div 50_{ms}) \div 16_{cpu} = 10_{台} $$ 已知 QPS 以及服务器数量,估算每笔耗时 每笔耗时毫秒 $$ = 1000 \div ( QPS \div ( 服务器数量 \times 每服务器CPU个数 ) ) $$ 例如: QPS:每秒处理3200笔 服务器数量:10 每服务器CPU个数:16 每笔耗时毫秒 $$ 1000 \div ( 3200 \div ( 10 \times 16 ) ) = 50_{ms}$$
KET UNIT10 WORDS 中文 英文 中文 英文 海滩 beach 沙漠 desert 森林 forest 岛 islands 湖泊 lake 高山 mountain 最深的 the deepest 最长的 the longest 最高的 the highest 最多的 the most 最大的 the biggest 最热的 the hottest 活动 activity 在机场 at the airport 在欧洲 in Europe 在世界上 in the world HOMEWORK 2024/01/03 完成 Unit10 练习册。 背诵PB P73 Reading Part2 Holiday Activities.默写并校准
KET UNIT3 1. Grammar Countable nouns How many 用于询问可数名词的数量 a few 修饰可数名词复数,表肯定意义,有一些,不是那么多; few 表否定意义,几乎没有 quite a few表示不少, 相当多 Uncountable nouns How much 用于问不可数名词的数量 a little 修饰不可数名词,表肯定意义,有一点儿 little 表否定意义,几乎没有 Countable nouns and Uncountable nouns a lot of 很多 no 没有 2. Plurals of nouns 1. 大多数名词在末尾加s: book-books chair-chairs cat-cats 2. 以s、x、ch、sh、o结尾的名词,在末尾加es: bus-buses class-classes glass-glasses match-matches watch-watches dish-dishes brush-brushes box-boxes fox-foxes half-halves 但也有例外,如photo-photos 3. 以辅音字母+y结尾的名词,把y变为i,再加es: fly-flies city-cities baby-babies 4. 以f或fe结尾的名词,大多数情况下变为v,并加es: leaf-leaves knife-knives wife-wives family-families 5.
Read moreKET UNIT4 1. Grammar Present Continuous 现在进行时,句子结构为 主语 + 助动词 "be" + 现在分词(动词-ing 形式), 例如: I am studying(我正在学习) I am studying for my exam(我正在为考试而学习) She is not working today(她今天不工作) What are you doing(你正在做什么) Present Simple 一般现在时,句子结构为 主语 + 谓语动词 I eat breakfast every day(我每天吃早饭) She does not like coffee(他不喜欢咖啡) Do they play tennis on Sundays?(他们星期日打网球吗) 2. Present participle(动词现在分词) 1. 一般规律:大多数动词的现在分词形式是在动词原形(即第一形式)后加-ing: play-playing read-reading sing-singing 2. 以不发音的字母 e 结尾的动词,去掉 e,再加-ing: make-making write-writing dance-dancing 但有一些例外,如 be-being 3.
Read moreKET UNIT5 1. Grammar 完成练习册 P20-21 阅读、语法部分 2. Passages 熟读学生用书 P37 短文-Joanna Middleton-a young gymnast. 课文抄写两遍(w1) 熟读学生用书P40语法部分文章- Yusra Mardini,课文抄写两遍。(w2) 学生用书P39 Listening Part4, 5个题目做精听练习。听一句重复一句,听力文本在P159左侧,抄写一遍。(w2) 3. Conversation I … because … or I think … because … Q: Which is the most exciting sport? A1: I think playing football is the most exciting sport because football is the most popular sport in the world. I love watching football match on TV. Q: How often do you play/go/do it?
Read moreKET UNIT6 1. Grammar Somebody have/has to do sth. (某人必须做某事) You have to clean bedroom at weekend. Somebody don’t/doesn’t have/has to do sth. (某人不必做某事) You don’t have to clean bedroom at weekend. Do/Does somebody have to do sth. (某人必须做某事吗?) Do you have to clean bedroom at weekend? Key grammar points: “To” must be followed by the base form of a verb. When the subject is in the third-person singular, “has to do” should be used.
Read moreKET UNIT7 1. Conversation Hospital is a place where you see the doctor. Church is a building where Christians go to pray. Cinema is a place where you go to see a film. Factory is a place where goods are made. Train station is a place where you catch the train. Hotel is a building for people to stay, usually for a short time, people pay for their rooms and meals.
Read more