update 优化 sse 自动装配
This commit is contained in:
parent
782821aeb2
commit
1619edb8a1
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.common.sse.config;
|
package org.dromara.common.sse.config;
|
||||||
|
|
||||||
|
import org.dromara.common.sse.controller.SseController;
|
||||||
import org.dromara.common.sse.core.SseEmitterManager;
|
import org.dromara.common.sse.core.SseEmitterManager;
|
||||||
import org.dromara.common.sse.listener.SseTopicListener;
|
import org.dromara.common.sse.listener.SseTopicListener;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
@ -8,6 +9,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* SSE 自动装配
|
||||||
|
*
|
||||||
* @author Lion Li
|
* @author Lion Li
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration
|
@AutoConfiguration
|
||||||
@ -25,4 +28,9 @@ public class SseAutoConfiguration {
|
|||||||
return new SseTopicListener();
|
return new SseTopicListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public SseController sseController(SseEmitterManager sseEmitterManager) {
|
||||||
|
return new SseController(sseEmitterManager);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user