database - Flyway 初始化失败。看不到文件
问题描述
我有错误:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-02-11 19:25:22.908 ERROR 8116 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Flyway failed to initialize: none of the following migration scripts locations could be found:
- classpath:db/migration
Action:
Review the locations above or check your Flyway configuration
但是带有脚本的文件夹和文件是存在的!
还:
Appication.properties
spring.jpa.generate-ddl=true
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=validate
为什么 Flyway 看不到文件?
解决方案
有什么不对劲。根据图像图标,您的文件夹是一个包,而不是资源文件夹。也许你的目录名db.migration
不是db/migration
?使用终端或文件管理器再次创建文件夹。
推荐阅读
- java - iText PDF:文档没有页面
- powershell - 无法在 powershell 中将自定义对象导出到 CSV
- python - 无法撤消 tkinter 文本字段中的图像
- sql - SQL逐步对列求和
- python - 通过切片扩展 numpy 数组
- python - 在 MacOS 上找不到 CSS 文件
- visual-studio-code - 如何在代码块之间的 VS Code 中留下更多空行?
- go - go-grpc 导入“google/protobuf/struct.proto”未找到或有错误
- vim - 退出 vim 后终端字体损坏
- lucene.net - Umbraco 8 检查/Lucene 查询在代码中未返回任何结果,但从后台搜索按预期工作