小编Tam*_*amm的帖子

BeanCreationException:创建名为“flywayInitializer”的 bean 时出错

我正在尝试在 Docker 容器中运行我的项目测试。所有测试在本地运行时都运行良好。当我尝试将测试移动到 docker 容器时,错误开始发生。这是错误消息:

java.lang.IllegalStateException: Failed to load ApplicationContext
[...]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: 
Migration V1__initial_user.sql failed
-------------------------------------
SQL State  : 42601
Error Code : 0
Message    : ERROR: syntax error at or near "GENERATED"
  Position: 45
Location   : db/migration/V1__initial_user.sql (/Users/villemossip/Desktop/GRP/GRP-SAS/application/build/resources/main/db/migration/V1__initial_user.sql)
Line       : 36
Statement  : CREATE TABLE revinfo
(
    rev      INTEGER GENERATED BY DEFAULT AS IDENTITY ( START …
Run Code Online (Sandbox Code Playgroud)

java testing postgresql flyway docker

10
推荐指数
1
解决办法
8万
查看次数

Python Regex仅在每个单词都大写的情况下匹配

我想匹配所有单词都大写的所有字符串。

目前,我已经尝试过类似的方法:

list = ["This sentence should Not Match", "This Should Only Match"]
match = []
for l in list:
   x = re.search("^[A-Z]*.", l)
   if x:
      match.append(l)
Run Code Online (Sandbox Code Playgroud)

例如,我希望正则表达式仅匹配以下内容:“这里是一个很好的例子”,但不应该匹配:“这里有类似的东西”,“这里是不匹配的例子”,“ TiHiS SeNtEnEcE”或“这不匹配。Foo”

我浏览了许多新闻文章,并试图匹配所有标题。这些标题通常每个单词都大写。

python regex

2
推荐指数
1
解决办法
58
查看次数

标签 统计

docker ×1

flyway ×1

java ×1

postgresql ×1

python ×1

regex ×1

testing ×1