我跟着this blog post使用引導儀表板到Spring example application部署到樞紐的Cloud Foundry。示例應用程序是Spring Boot應用程序(1.3.2.RELEASE),使用JSP並具有WAR包裝。錯誤部署示例應用程序(春季引導1.3.4,JSP,WAR包裝)在樞紐的Cloud Foundry採用STS
應用程序似乎開始好,但主頁是空白的。試圖捲曲,我看到下面的輸出:
但是,當我部署使用命令行應用程序:
cf push np-spring-tutorial -p spring-tutorial-0.0.1-SNAPSHOT.war
的應用得到部署並運行良好。
那麼,Boot Dashboard部署到PWS的方式是不是還不支持帶有JSP的WAR文件?我已經在使用Boot Dashboard部署JSP less JAR文件之前嘗試過了,並且它們運行良好。
更新:
所推薦的桑傑·拉瓦特,我更新的春天引導版本1.3.4
,而現在也有一個manifest.yml
如下:
---
applications:
- name: np-spring-tutorial
buildpack: https://github.com/cloudfoundry/java-buildpack.git
path: target/spring-tutorial-0.0.1-SNAPSHOT.war
env:
application_url: http://np-spring-tutorial.cfapps.io
services:
- np-spring-tutorial-db
timeout: 180
通過打擊和審判,我注意到實際需要的唯一設置是path: target/spring-tutorial-0.0.1-SNAPSHOT.war
。
現在應用程序正在運行,我可以看到頁面。然而,啓動應用程序時,控制檯上會出現以下錯誤:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/vcap/app/WEB-INF/lib/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/vcap/app/WEB-INF/lib/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
它是一個Spring Boot應用程序嗎?如果是,請提及Boot版本號。 –
是的,它是一個Spring Boot應用程序。版本是1.3.2.RELEASE。 (更新了問題) – Sanjay