เมื่อฉันพยายามโทรหาสปริงเว็บไคลเอ็นต์ ฉันได้รับข้อผิดพลาด:
HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalStateException: Async support must be enabled on a servlet and for all filters involved in async request processing. This is done in Java code using the Servlet API or by adding "true" to servlet and filter declarations in web.xml.
ฉันไม่มีสิทธิ์เข้าถึง / ไม่อยากยุ่งกับไฟล์ web.xml ตัวควบคุมสปริงของฉันเป็นดังนี้:
@Controller
@RequestMapping("/test/test")
public class MyController
{
//Using DeferedResult and Http get / post
}
สิ่งที่ฉันลอง: วาง @Async ไว้เหนือคลาสและอยู่เหนือวิธีการรับ/โพสต์ ลองวาง @EnableAsync ไว้เหนือคลาสด้วย ฉันจะเปิดใช้งานการสนับสนุน async ในโค้ด java โดยไม่ต้องทำใน web.xml ได้อย่างไร ไม่พบความช่วยเหลือทางออนไลน์มากนัก
web.xml
ของคุณ - person Strelok   schedule 01.07.2015