0
我想創建一套springMVC微服務與服務器端使用JSP呈現。我的springMVC應用程序具有控制器,可將模型對象返回到執行視圖的JSP。你如何做服務器端渲染與尤里卡和springMVC
我的JSP位於「META-INF/resources/WEB-INF/jsp /」文件夾中。當我運行Springboot應用程序時,它沒有任何問題,我的模型在瀏覽器中正常顯示。
然而,當我尤里卡使用帶有zuul做服務註冊表並經過一個共同的應用程序服務,我收到以下錯誤
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Aug 24 23:30:25 IST 2016
There was an unexpected error (type=Internal Server Error, status=500).
GENERAL
並在控制檯它規定
com.netflix.zuul.exception.ZuulException: Forwarding error
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException(RibbonRoutingFilter.java:158) ~[spring-cloud-netflix-core-1.1.5.RELEASE.jar!/:1.1.5.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:133) ~[spring-cloud-netflix-core-1.1.5.RELEASE.jar!/:1.1.5.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:79) ~[spring-cloud-netflix-core-1.1.5.RELEASE.jar!/:1.1.5.RELEASE]
at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:112) ~[zuul-core-1.1.0.jar!/:1.1.0]
at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:197) ~[zuul-core-1.1.0.jar!/:1.1.0]
at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:161) ~[zuul-core-1.1.0.jar!/:1.1.0]
at com.netflix.zuul.FilterProcessor.route(FilterProcessor.java:120) ~[zuul-core-1.1.0.jar!/:1.1.0]
at com.netflix.zuul.ZuulRunner.route(ZuulRunner.java:96) ~[zuul-core-1.1.0.jar!/:1.1.0]
at com.netflix.zuul.http.ZuulServlet.route(ZuulServlet.java:116) ~[zuul-core-1.1.0.jar!/:1.1.0]
at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:81) ~[zuul-core-1.1.0.jar!/:1.1.0]
任何想法爲什麼我得到這個。我認爲這是由於我可能會呈現JSP(視圖)。
你還沒有提供太多的上下文。你能否包括你在Zuul中設定的轉發規則的細節?也許在Zuul服務器上有一個DEBUG級別的日誌記錄來確定它想要做什麼? –