diff --git a/basic-properties/src/main/java/ink/wgink/properties/websocket/WebSocketProperties.java b/basic-properties/src/main/java/ink/wgink/properties/websocket/WebSocketProperties.java new file mode 100644 index 00000000..a4f1663b --- /dev/null +++ b/basic-properties/src/main/java/ink/wgink/properties/websocket/WebSocketProperties.java @@ -0,0 +1,44 @@ +package ink.wgink.properties.websocket; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * @ClassName: WebSocketProperties + * @Description: WebSocket配置 + * @Author: wanggeng + * @Date: 2021/9/11 9:51 下午 + * @Version: 1.0 + */ +@Component +@ConfigurationProperties(prefix = "websocket") +public class WebSocketProperties { + + private String url; + private Integer port; + private String context; + + public String getUrl() { + return url == null ? "" : url.trim(); + } + + public void setUrl(String url) { + this.url = url; + } + + public Integer getPort() { + return port == null ? 0 : port; + } + + public void setPort(Integer port) { + this.port = port; + } + + public String getContext() { + return context == null ? "" : context.trim(); + } + + public void setContext(String context) { + this.context = context; + } +}