我想为测试添加一个额外的配置文件。我想根据实体类生成表,而不是使用flyway。
我尝试在application.yaml中编写以下内容。
spring:
profiles: test
jpa:
generate-ddl: true
hibernate:
datasource:
url: jdbc:h2:mem:test_db;MODE=MSSQLServer
username: sa
password:
但是Flyway无论如何都会开始
application.yml
中以下内容也是完全有效的:spring.flyway.enabled: false
。如果不起作用,请尝试将 'false' 用引号括起来... - masterxilo