在classpath:/db.迁移中有迁移( V1__Strory_create.sql和V2__Task_create.sql ),但是flyway没有看到这一点,因此出现了msg。
2022-05-02 17:28:07.993 INFO 45296 - restartedMain c.ConfigServicePropertySourceLocator:从服务器获取配置地址:http://localhost:8888/story 2022-05-02 17:28:08.213 INFO 45296 - restartedMain c.ConfigServicePropertySourceLocator: Located environment: name=story,profiles=story,label=default,version=null,state=null 2022-05-02 17:28:08.215 INFO 45296 -- restartedMain b.c.PropertySourceBootstrapConfiguration : Located property source: BootstrapPropertySource {name='bootstrapProperties-configClient'},{name='bootstrapProperties-classpath:/config/story.yml'} 2022-05-02 17:28:08:331 INFO com.openhelp.story.StoryApplication -以下一个配置文件是活动的:“默认”2022-05-02 17:28:11:368调试com.zaxxer.hikari.HikariConfig -驱动程序类org.postgresql.Driver找到在线程上下文类加载程序org.springframework.boot.devtools.restart.classloader.RestartClassLoader@707d8885 2022-05-02 17:28:11:426错误o.s.b.d.LoggingFailureAnalysisReporter -
*申请启动失败
描述:
天桥未能初始化:找不到以下迁移脚本位置:
操作:
检查上面的位置或检查您的天桥配置。
进程已完成,退出代码为0
使用bootstrap.yml从配置服务中获取配置
spring:
application:
name: story
profiles:
active: default
cloud:
config:
uri: ${vcap.services.configserver.credentials.uri:http://localhost:8888/story}和获取配置
server:
port: 0
eureka:
instance:
instance-id: ${spring.application.name}:${random.uuid}
client:
service-url:
defaultZone: http://localhost:8761/eureka
spring:
jpa:
generate-ddl: 'false'
properties:
hibernate:
jdbc:
time_zone: UTC
generate_statistics: 'false'
format_sql: 'true'
use_sql_comments: 'false'
show_sql: 'true'
hibernate:
ddl-auto: validate
open-in-view: 'false'
flyway:
baseline-on-migrate: 'true'
datasource:
driver-class-name: org.postgresql.Driver
password: '1'
username: postgres
url: jdbc:postgresql://127.0.0.1:5432/openhelp_story
autoconfigure:
exclude: org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
logging:
level:
org:
apache:
tomcat:
jdbc:
pool: debug
nodeValue: ERROR
springframework:
security: info
nodeValue: DEBUG
hibernate:
nodeValue: ERROR
jdbc: ERROR
stat: DEBUG
SQL: WARN
cache: ERROR
root: ERROR
com:
openhelp: debug
zaxxer:
hikari: debug
pattern:
console: '%d{yyyy-MM-dd HH:mm:ss:SSS} %-5level %logger{36} - %msg%n'
management:
endpoints:
jmx:
exposure:
include: health
openhelp:
logging:
path: logs
archive-path: logs/logs-archive正如我们可以从上面的日志中看到的那样,成功地获取了配置。也许配置是错的?
发布于 2022-05-02 19:55:21
问题在于classpath:/db.migration而不是classpath:/db/migration。我无意中创建了一个文件夹。
https://stackoverflow.com/questions/72088343
复制相似问题