Skip to content

Commit 6f6eb3d

Browse files
ghostg00sbrannen
authored andcommitted
Fix example in Javadoc for @EnableWebSocket
The `echoWebSocketHandler()` method is not defined in the `WebSocketConfigurer` interface and should therefore be annotated with `@Bean` instead of `@Override`. Closes gh-30187
1 parent a94c50e commit 6f6eb3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocket.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@
4949
* registry.addHandler(echoWebSocketHandler(), "/echo").withSockJS();
5050
* }
5151
*
52-
* @Override
52+
* @Bean
5353
* public WebSocketHandler echoWebSocketHandler() {
5454
* return new EchoWebSocketHandler();
5555
* }

0 commit comments

Comments
 (0)