Fix broken link for Server-Sent Events
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details

Signed-off-by: Taeik Lim <sibera21@gmail.com>
Closes gh-34705
This commit is contained in:
Taeik Lim 2025-04-02 21:33:22 +09:00 committed by Sébastien Deleuze
parent 671d972454
commit a946fe2bf8
9 changed files with 16 additions and 16 deletions

View File

@ -276,7 +276,7 @@ ServerResponse.async(asyncResponse);
----
======
https://www.w3.org/TR/eventsource/[Server-Sent Events] can be provided via the
https://html.spec.whatwg.org/multipage/server-sent-events.html[Server-Sent Events] can be provided via the
static `sse` method on `ServerResponse`. The builder provided by that method
allows you to send Strings, or other objects as JSON. For example:

View File

@ -281,7 +281,7 @@ invokes the configured exception resolvers and completes the request.
=== SSE
`SseEmitter` (a subclass of `ResponseBodyEmitter`) provides support for
https://www.w3.org/TR/eventsource/[Server-Sent Events], where events sent from the server
https://html.spec.whatwg.org/multipage/server-sent-events.html[Server-Sent Events], where events sent from the server
are formatted according to the W3C SSE specification. To produce an SSE
stream from a controller, return `SseEmitter`, as the following example shows:

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -395,7 +395,7 @@ public class MediaType extends MimeType implements Serializable {
/**
* Public constant media type for {@code text/event-stream}.
* @since 4.3.6
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events W3C recommendation</a>
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>
*/
public static final MediaType TEXT_EVENT_STREAM;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
* @since 5.0
* @param <T> the type of data that this event contains
* @see ServerSentEventHttpMessageWriter
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events W3C recommendation</a>
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>
*/
public final class ServerSentEvent<T> {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -262,7 +262,7 @@ public abstract class BodyInserters {
* @param eventsPublisher the {@code ServerSentEvent} publisher to write to the response body
* @param <T> the type of the data elements in the {@link ServerSentEvent}
* @return the inserter to write a {@code ServerSentEvent} publisher
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events W3C recommendation</a>
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>
*/
// Parameterized for server-side use
public static <T, S extends Publisher<ServerSentEvent<T>>> BodyInserter<S, ServerHttpResponse> fromServerSentEvents(

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -293,7 +293,7 @@ public interface ServerResponse {
* @param consumer consumer that will be provided with an event builder
* @return the server-side event response
* @since 5.3.2
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events</a>
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>
*/
static ServerResponse sse(Consumer<SseBuilder> consumer) {
return SseServerResponse.create(consumer, null);
@ -323,7 +323,7 @@ public interface ServerResponse {
* @param timeout maximum time period to wait before timing out
* @return the server-side event response
* @since 5.3.2
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events</a>
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>
*/
static ServerResponse sse(Consumer<SseBuilder> consumer, Duration timeout) {
return SseServerResponse.create(consumer, timeout);

View File

@ -46,7 +46,7 @@ import org.springframework.web.servlet.ModelAndView;
/**
* Implementation of {@link ServerResponse} for sending
* <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events</a>.
* <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>.
*
* @author Arjen Poutsma
* @author Sebastien Deleuze

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -34,7 +34,7 @@ import org.springframework.web.servlet.ModelAndView;
/**
* A specialization of {@link ResponseBodyEmitter} for sending
* <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events</a>.
* <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>.
*
* @author Rossen Stoyanchev
* @author Juergen Hoeller

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,7 +31,7 @@ import org.springframework.web.socket.sockjs.transport.session.StreamingSockJsSe
/**
* A TransportHandler for sending messages via Server-Sent Events:
* <a href="https://dev.w3.org/html5/eventsource/">https://dev.w3.org/html5/eventsource/</a>.
* <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>.
*
* @author Rossen Stoyanchev
* @since 4.0