0

如何在payara管理页面中设置环境变量,然后在application.properties文件中给它spring boot?

  1. 我在管理页面(:4848)->配置->服务器配置->JVM设置中设置了一个环境变量,带有-D前缀(“-D”)-DTELEGRAM和值@mybot或不带前缀-D。

  2. 在 application.properties 中调用 dev.bot.name=${ENV=TELEGRAM} 或 dev.bot.name=${TELEGRAM} 就像在文档中一样:

https://docs.payara.fish/community/docs/documentation/payara-server/server-configuration/var-substitution/usage-of-variables.html https://docs.payara.fish/community/docs/documentation /payara-server/server-configuration/var-substitution/types-of-variables.html

但我得到 IllegalArgumentException:无法解析占位符 'ENV=TELEGRAM'

4

0 回答 0