@@ -91,7 +91,7 @@ public class WebMvcSseServerTransportProvider implements McpServerTransportProvi
91
91
92
92
private final String sseEndpoint ;
93
93
94
- private final String messageBaseUrl ;
94
+ private final String baseUrl ;
95
95
96
96
private final RouterFunction <ServerResponse > routerFunction ;
97
97
@@ -139,23 +139,23 @@ public WebMvcSseServerTransportProvider(ObjectMapper objectMapper, String messag
139
139
* Constructs a new WebMvcSseServerTransportProvider instance.
140
140
* @param objectMapper The ObjectMapper to use for JSON serialization/deserialization
141
141
* 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.
144
144
* @param messageEndpoint The endpoint URI where clients should send their JSON-RPC
145
145
* messages via HTTP POST. This endpoint will be communicated to clients through the
146
146
* SSE connection's initial endpoint event.
147
147
* @param sseEndpoint The endpoint URI where clients establish their SSE connections.
148
148
* @throws IllegalArgumentException if any parameter is null
149
149
*/
150
- public WebMvcSseServerTransportProvider (ObjectMapper objectMapper , String messageBaseUrl , String messageEndpoint ,
150
+ public WebMvcSseServerTransportProvider (ObjectMapper objectMapper , String baseUrl , String messageEndpoint ,
151
151
String sseEndpoint ) {
152
152
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" );
154
154
Assert .notNull (messageEndpoint , "Message endpoint must not be null" );
155
155
Assert .notNull (sseEndpoint , "SSE endpoint must not be null" );
156
156
157
157
this .objectMapper = objectMapper ;
158
- this .messageBaseUrl = messageBaseUrl ;
158
+ this .baseUrl = baseUrl ;
159
159
this .messageEndpoint = messageEndpoint ;
160
160
this .sseEndpoint = sseEndpoint ;
161
161
this .routerFunction = RouterFunctions .route ()
@@ -269,7 +269,7 @@ private ServerResponse handleSseConnection(ServerRequest request) {
269
269
try {
270
270
sseBuilder .id (sessionId )
271
271
.event (ENDPOINT_EVENT_TYPE )
272
- .data (this .messageBaseUrl + this .messageEndpoint + "?sessionId=" + sessionId );
272
+ .data (this .baseUrl + this .messageEndpoint + "?sessionId=" + sessionId );
273
273
}
274
274
catch (Exception e ) {
275
275
logger .error ("Failed to send initial endpoint event: {}" , e .getMessage ());
0 commit comments