spring - weblogic上的spring-boot rest应用程序
问题描述
我有一个 Spring Boot Rest 应用程序在 Tomcat 上运行良好。我的目标是在 weblogic 上部署相同的。我已经按照春季网站上提到的步骤here
我在项目中没有 web.xml 文件。部署后我遇到了这个错误。
java.lang.IllegalStateException: No thread-bound request found:
Are you referring to request attributes outside of an actual web request,
or processing a request outside of the originally receiving thread? If you are actually operating with
in a web request and still receive this message, your code is probably running outside
of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener
or RequestContextFilter to expose the current request.
at org.springframework.web.context.request.RequestContextHolder.currentR
equestAttributes(RequestContextHolder.java:131) ~[spring-web-4.3.13.RELEASE.jar:
4.3.13.RELEASE]
相同的请求在 tomcat 中工作正常。我不确定是否需要在 ContextLoaderListener 中包含一个 web.xml 文件。但是我想知道在tomcat容器中怎么不是问题。