步骤:
- 使用 start.spring.io 创建新项目
- 在本地运行它 - 有效
- 运行 gradle 任务
jar
- 将 jar 推送到 bluemix
cf push demoWar.jar
Downloaded app package (20.1M) Staging... None of the buildpacks detected a compatible application Exit status 222 Staging failed: Exited with status 222 Destroying container
FAILED Error restarting application: NoAppDetectedError
TIP: Buildpacks are detected when the "cf push" is executed from within the dire ctory that contains the app source code.
最佳答案
尝试两件事: 1. 使用 -p 命令定位您的可部署工件。这看起来类似于 cf p APP_NAME -p PATH_TO_YOUR_WAR。我通常会这样链接构建和部署命令:mvn clean package && cf p APP_NAME -p PATH_TO_YOUR_WAR。
- 如果这不起作用,那么您可以指定一个构建包。所以 cf p APP_NAME -p PATH_TO_YOUR_WAR -b SOME_BUILDPACK。您可以通过调用 cf buildpacks 查看可用的构建包。
希望这对您有所帮助。
关于java - 带有 bluemix 错误 : None of the buildpacks detected a compatible application 的 spring boot,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43203620/