我有一个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容器中这不是什么问题。