当前位置: 首页>>代码示例>>Java>>正文


Java StompEndpointRegistry.addEndpoint方法代码示例

本文整理汇总了Java中org.springframework.web.socket.config.annotation.StompEndpointRegistry.addEndpoint方法的典型用法代码示例。如果您正苦于以下问题:Java StompEndpointRegistry.addEndpoint方法的具体用法?Java StompEndpointRegistry.addEndpoint怎么用?Java StompEndpointRegistry.addEndpoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.web.socket.config.annotation.StompEndpointRegistry的用法示例。


在下文中一共展示了StompEndpointRegistry.addEndpoint方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerStompEndpoints

import org.springframework.web.socket.config.annotation.StompEndpointRegistry; //导入方法依赖的package包/类
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/hello");
}
 
开发者ID:nielsutrecht,项目名称:spring-boot-websocket-client,代码行数:5,代码来源:WebSocketConfig.java

示例2: registerStompEndpoints

import org.springframework.web.socket.config.annotation.StompEndpointRegistry; //导入方法依赖的package包/类
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {

    logger.info("Initializing websocket standard on path:'{}' ...", defaultWebsocketEndpointPath);
    StompWebSocketEndpointRegistration webSockedEndpoint  = stompEndpointRegistry.addEndpoint(defaultWebsocketEndpointPath);
    logger.info("Initializing websocket sockJs on path:'{}' ...", defaultSockJsEndpointPath);
    StompWebSocketEndpointRegistration sockJsEndpoint = stompEndpointRegistry.addEndpoint(defaultSockJsEndpointPath);
    sockJsEndpoint.withSockJS();
    if (Boolean.valueOf(corsEnabled)){
        logger.info("Initializing cors on websockets");
        webSockedEndpoint.setAllowedOrigins(StringUtils.commaDelimitedListToStringArray(allowedOrigins));
        sockJsEndpoint.setAllowedOrigins(StringUtils.commaDelimitedListToStringArray(allowedOrigins));
    }
}
 
开发者ID:Appverse,项目名称:appverse-server,代码行数:15,代码来源:FrontFacadeWebSocketSecurityAutoConfiguration.java

示例3: registerStompEndpoints

import org.springframework.web.socket.config.annotation.StompEndpointRegistry; //导入方法依赖的package包/类
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
	registry.addEndpoint("/socket");
    registry.addEndpoint("/socket").withSockJS();
}
 
开发者ID:SystemOfAProg,项目名称:VS2Labor,代码行数:6,代码来源:WebSocketConfig.java

示例4: registerStompEndpoints

import org.springframework.web.socket.config.annotation.StompEndpointRegistry; //导入方法依赖的package包/类
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    //register chat endpoint and enable SockJS
    registry.addEndpoint("/websocket/chat");
    registry.addEndpoint("/websocket/chat").withSockJS();
}
 
开发者ID:LithiumSR,项目名称:media_information_service,代码行数:7,代码来源:WebSocketConfig.java

示例5: registerStompEndpoints

import org.springframework.web.socket.config.annotation.StompEndpointRegistry; //导入方法依赖的package包/类
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    stompEndpointRegistry.addEndpoint("/test");
}
 
开发者ID:tinywind,项目名称:react-practice-web,代码行数:5,代码来源:WebSocketConfig.java

示例6: registerStompEndpoints

import org.springframework.web.socket.config.annotation.StompEndpointRegistry; //导入方法依赖的package包/类
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/echo");
}
 
开发者ID:backpaper0,项目名称:spring-boot-sandbox,代码行数:5,代码来源:StompConfig.java

示例7: registerStompEndpoints

import org.springframework.web.socket.config.annotation.StompEndpointRegistry; //导入方法依赖的package包/类
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
	registry.addEndpoint("/stomp");
	registry.addEndpoint("/sockjs").withSockJS();
}
 
开发者ID:Treydone,项目名称:mandrel,代码行数:6,代码来源:WebSocketConfiguration.java

示例8: registerStompEndpoints

import org.springframework.web.socket.config.annotation.StompEndpointRegistry; //导入方法依赖的package包/类
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {

    // Register a pure WebSocket endpoint (ws://myserver.com/ws/rest/messages)
    registry.addEndpoint("/messages");

    // Register additional fallback handling using sock-js (http://myserver.com/ws/rest/messages)
    registry.addEndpoint("/messages").withSockJS();

}
 
开发者ID:zhaar,项目名称:Neuralnet-IoT-Car,代码行数:11,代码来源:StompWebSocketConfig.java


注:本文中的org.springframework.web.socket.config.annotation.StompEndpointRegistry.addEndpoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。