我正在尝试使用JSP创建一组带有服务器端呈现的springMVC微服务。我的springMVC应用程序具有控制器,可以将模型对象返回到执行视图的JSP。
我的JSP在" META-INF / resources / WEB-INF / jsp /"夹。当我运行Springboot应用程序时,它没有任何问题,我的模型在浏览器中正确显示。
然而,当我使用eureka与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(视图)的方式。
答案 0 :(得分:0)
感谢您的快速反应。我发现这对我对zuul路线的理解是一个问题。一旦我纠正了路线,一切都通过尤里卡正常工作。