提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.framework.websocket.config; |
H |
2 |
|
|
3 |
import lombok.Data; |
|
4 |
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
5 |
import org.springframework.validation.annotation.Validated; |
|
6 |
|
|
7 |
import javax.validation.constraints.NotEmpty; |
|
8 |
import javax.validation.constraints.NotNull; |
|
9 |
|
|
10 |
/** |
|
11 |
* WebSocket 配置项 |
|
12 |
* |
|
13 |
* @author xingyu4j |
|
14 |
*/ |
|
15 |
@ConfigurationProperties("iailab.websocket") |
|
16 |
@Data |
|
17 |
@Validated |
|
18 |
public class WebSocketProperties { |
|
19 |
|
|
20 |
/** |
|
21 |
* WebSocket 的连接路径 |
|
22 |
*/ |
|
23 |
@NotEmpty(message = "WebSocket 的连接路径不能为空") |
|
24 |
private String path = "/ws"; |
|
25 |
|
|
26 |
/** |
|
27 |
* 消息发送器的类型 |
|
28 |
* |
|
29 |
* 可选值:local、redis、rocketmq、kafka、rabbitmq |
|
30 |
*/ |
|
31 |
@NotNull(message = "WebSocket 的消息发送者不能为空") |
|
32 |
private String senderType = "local"; |
|
33 |
|
|
34 |
} |