【发布时间】:2016-02-12 02:52:29
【问题描述】:
我有一个 Spring Boot 项目,它在 application.properties 中有一系列配置变量。例如:
server.ssl.enabled = false
server.port = 8080
我想将这些变量移动到一个 upstart 脚本中,在那里它们将被加载到环境变量中并覆盖 application.properties 文件的内容。
这是我尝试将这些加载到新贵的 conf 文件中:
env server.ssl.enabled=false
env server.port=8080
用于检查 upstart 配置文件的init-checkconf /etc/init/my-example.conf 实用程序产生以下错误,server.ssl.enabled 行中的第一个错误:
ERROR: File /etc/init/my-example.conf: syntax invalid:
init:my-example.conf:15: Unexpected token
在 upstart 中使用 application.properties 文件中使用的名称设置这些变量的正确语法是什么?我发现的所有新贵示例都使用不包含字符. 的名称。
【问题讨论】:
标签: spring configuration spring-boot upstart