首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >天桥迁移失败

天桥迁移失败
EN

Stack Overflow用户
提问于 2022-05-02 14:40:55
回答 1查看 1K关注 0票数 0

在classpath:/db.迁移中有迁移( V1__Strory_create.sqlV2__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 -

*申请启动失败

描述:

天桥未能初始化:找不到以下迁移脚本位置:

  • classpath:db/migration

操作:

检查上面的位置或检查您的天桥配置。

进程已完成,退出代码为0

使用bootstrap.yml从配置服务中获取配置

代码语言:javascript
运行
复制
spring:
  application:
    name: story
  profiles:
    active: default
  cloud:
    config:
      uri: ${vcap.services.configserver.credentials.uri:http://localhost:8888/story}

和获取配置

代码语言:javascript
运行
复制
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

正如我们可以从上面的日志中看到的那样,成功地获取了配置。也许配置是错的?

EN

回答 1

Stack Overflow用户

发布于 2022-05-02 19:55:21

问题在于classpath:/db.migration而不是classpath:/db/migration。我无意中创建了一个文件夹。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72088343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档