我正试图利用Xml基配置在java泉MVC进行服务器Sent活动。 但是,我正在带上以下错误信息,同时打上了以下的URL:
Java版
sourceCompatibility = 1.8
targetCompatibility = 1.8
Servelet API: 4.0.1 spring-webmvc:5.2.0 spring-web:5.3.8
主计长:
@GetMapping(path = "/subscribe-sse", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public SseEmitter subscribe() {
SseEmitter emitter = new SseEmitter(Long.MAX_VALUE);
return emitter;
}
顺便说一句:
java.lang.IncompatibleClassChangeError: Expected non-static field org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.logger
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:128)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
javax.servlet.http.HttpServlet.service(HttpServlet.java:502)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
我正试图用春天boot子执行服务器Sent活动,但获得不兼容的ClassChangeError