【问题标题】:How can I find the launch script that spring boot uses? [closed]如何找到 spring boot 使用的启动脚本? [关闭]
【发布时间】:2019-09-05 18:27:33
【问题描述】:

我想查看 spring boot 在执行我的不完全可执行的 jar 时使用的确切脚本。我特别感兴趣的是它如何找到配置 (.yml) 文件。

【问题讨论】:

    标签: java spring-boot jar


    【解决方案1】:

    您可以使用命令行参数来指定配置文件

    https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html

    例如

    $ java -jar myproject.jar --spring.config.location=classpath:/some-file.yml
    

    【讨论】:

      【解决方案2】:

      配置您的.yml(如果可能):

      logging:
        level:
          ROOT: DEBUG 
      

      或者你想直接找到你的.yml

      【讨论】:

        猜你喜欢
        • 2020-03-01
        • 2022-01-24
        • 2019-04-11
        • 2017-02-04
        • 1970-01-01
        • 2014-07-02
        • 2017-06-12
        • 1970-01-01
        • 2018-07-16
        相关资源
        最近更新 更多