@@ -91,7 +91,7 @@ public class WebMvcSseServerTransportProvider implements McpServerTransportProvi
9191
9292 private final String sseEndpoint ;
9393
94- private final String messageBaseUrl ;
94+ private final String baseUrl ;
9595
9696 private final RouterFunction <ServerResponse > routerFunction ;
9797
@@ -139,23 +139,23 @@ public WebMvcSseServerTransportProvider(ObjectMapper objectMapper, String messag
139139 * Constructs a new WebMvcSseServerTransportProvider instance.
140140 * @param objectMapper The ObjectMapper to use for JSON serialization/deserialization
141141 * of messages.
142- * @param messageBaseUrl The base URL for the message endpoint, used to construct the
143- * full endpoint URL for clients.
142+ * @param baseUrl The base URL for the message endpoint, used to construct the full
143+ * endpoint URL for clients.
144144 * @param messageEndpoint The endpoint URI where clients should send their JSON-RPC
145145 * messages via HTTP POST. This endpoint will be communicated to clients through the
146146 * SSE connection's initial endpoint event.
147147 * @param sseEndpoint The endpoint URI where clients establish their SSE connections.
148148 * @throws IllegalArgumentException if any parameter is null
149149 */
150- public WebMvcSseServerTransportProvider (ObjectMapper objectMapper , String messageBaseUrl , String messageEndpoint ,
150+ public WebMvcSseServerTransportProvider (ObjectMapper objectMapper , String baseUrl , String messageEndpoint ,
151151 String sseEndpoint ) {
152152 Assert .notNull (objectMapper , "ObjectMapper must not be null" );
153- Assert .notNull (messageBaseUrl , "Message base URL must not be null" );
153+ Assert .notNull (baseUrl , "Message base URL must not be null" );
154154 Assert .notNull (messageEndpoint , "Message endpoint must not be null" );
155155 Assert .notNull (sseEndpoint , "SSE endpoint must not be null" );
156156
157157 this .objectMapper = objectMapper ;
158- this .messageBaseUrl = messageBaseUrl ;
158+ this .baseUrl = baseUrl ;
159159 this .messageEndpoint = messageEndpoint ;
160160 this .sseEndpoint = sseEndpoint ;
161161 this .routerFunction = RouterFunctions .route ()
@@ -269,7 +269,7 @@ private ServerResponse handleSseConnection(ServerRequest request) {
269269 try {
270270 sseBuilder .id (sessionId )
271271 .event (ENDPOINT_EVENT_TYPE )
272- .data (this .messageBaseUrl + this .messageEndpoint + "?sessionId=" + sessionId );
272+ .data (this .baseUrl + this .messageEndpoint + "?sessionId=" + sessionId );
273273 }
274274 catch (Exception e ) {
275275 logger .error ("Failed to send initial endpoint event: {}" , e .getMessage ());
0 commit comments