增加SSE跨域支持
This commit is contained in:
parent
636b7c5475
commit
70564219ae
@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.vmanager.SseController;
|
|||||||
import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEventListener;
|
import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEventListener;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||||
@ -13,6 +14,7 @@ import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
|||||||
* @data: 2021-01-20
|
* @data: 2021-01-20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@CrossOrigin
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/api")
|
@RequestMapping("/api")
|
||||||
public class SseController {
|
public class SseController {
|
||||||
|
Loading…
Reference in New Issue
Block a user