manifest - YAML 解组错误无法将 !!str ` ` 解组为 str
问题描述
我正在尝试通过manifest.yml
文件将我的 Spring Boot 应用程序推送到 Pivotal Cloud Foundry (PCF) 上。
在推送应用程序时,我收到以下错误:
{
Pushing from manifest to org mastercard_connect / space developer-sandbox as e069875...
Using manifest file C:\Sayli\Workspace\PCF\healthwatch-api\healthwatch-api\manifest.yml
yaml: unmarshal errors:
line 6: cannot unmarshal !!str `healthw...` into []string
FAILED }
这是manifest.yml
文件:
{applications:
- name: health-watch-api
memory: 2GB
instances: 1
paths: healthwatch-api-jar\target\healthwatch-api-jar-0.0.1-SNAPSHOT.jar
services: healthwatch-api-database
}
解决方案
您的清单无效。@K.AJ 发布的链接是一个很好的参考。
https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html
这是一个示例,它使用文件中的值。
---
applications:
- name: health-watch-api
memory: 2G
path: healthwatch-api-jar/target/healthwatch-api-jar-0.0.1-SNAPSHOT.jar
services:
- healthwatch-api-database
您不需要前导/尾随{
}
's,它path
不是paths
并且services
是一个数组。我认为最后一个是 cli 最抱怨的。
希望有帮助!
推荐阅读
- javascript - 对列表中的每个对象进行 api 调用
- angular - 如何关闭 mouseover 和 mouseout 事件中的错误
- language-agnostic - 将游戏逻辑与渲染线程分离
- javascript - 你好。我想降低 java 脚本中按钮到顶部的滚动速度。任何人都可以帮助我吗?
- datetime - Hive 中的高效日期案例逻辑
- python - 使用 cuda 在 pytorch 1.0 上训练 frcnn:分段错误(核心转储)
- vba - 总连续天数。我怎么知道 Date+1 是否存在?
- python - 为什么范围不返回一个数组,但是当我将它添加到列表时呢?
- java - 如何使PMD的自定义java规则集按类别返回结果
- sql - VBA中的SQL语句太长