spring_boot_starter_web 0.8.1
spring_boot_starter_web: ^0.8.1 copied to clipboard
Spring MVC for Dart: @RestController with @GetMapping and @PostMapping on dart:io, JSON bodies, @Valid, ProblemDetail errors, server-sent events, filters, CORS.
0.8.1 #
- No changes of its own; released with the family version 0.8.1.
0.8.0 #
- The rate limiter's store is asked at startup that it is set up (
RateLimitStoreVerifier, anApplicationRunner; stores that implementVerifiableRateLimitStore: the SQL store, Supabase's database function, Cloudflare D1). A table, a function or a binding that is missing fails the start with what to run; before, a forgotten migration showed only at the first request under a limit, as a 503. A store that cannot be reached at that moment is a WARN and the start goes on.spring.web.rate-limit.verify-store=falseskips the check and its one call to the store. - Fixed: a question for the first isolate asked in another one (
PrimaryIsolate.ask,IsolateScaler.scaleTothere) no longer waits for ever when no answer comes (the first isolate is stopping, its handler never answers): it fails with aTimeoutExceptionthat names the question after one minute, a scaling step after three. - A graceful stop (
server.shutdown: graceful, the default) of a server without TLS first stops accepting connections, answers what still arrives on the open ones withConnection: close, and closes when they have left or have sent nothing for a moment (five seconds at most). Before, every keep-alive connection that was idle at that instant was closed at once, and with it a request its client had just sent: an isolate leaving the pool (server.isolates) under load lost a few requests each time, and so did a rolling restart. With TLS (dart:io keeps that socket to itself) and withserver.shutdown: immediatethe stop is as it was. requestTargetProblem(uri): the built-in server's check of a request target (an encoded/,\or NUL, a.or..segment, a broken percent-escape: 400), for aWebServerof another kind; the edge starter's fetch server asks it too.- A rate limiter (
spring.web.rate-limit.*): rules by path and method with a limit as<count>/<duration>(a token bucket,burstfor its size) and a key (user, the default: the authenticated user, else the client's address;ip; a SpEL expression in#{...}; a key of aRateLimitKeyResolverbean). A request past a limit is answered 429 withRetry-Afterand aProblemDetail(TooManyRequestsException) before its body is read; every matching rule applies;RateLimit-Limit/-Remaining/-Reseton the answers (headers: falseturns them off). Off unlessenabled: trueor a rule exists. - Two filters (
RateLimitFilter): the rules keyed byipat -5000, before the sessions and the security filter chain, the rules keyed by the user or an expression at -50, right after the chain, whererequest.principalis the authenticated user.@RateLimiter('10/1m', key: ...)on a controller method or class (RateLimiterInterceptor); a controller with the annotation while nothing turned the limiter on stops the start. - The client's address (
ClientAddressResolver,TrustedProxyClientAddressResolver): the connection's own unless it comes fromspring.web.rate-limit.trusted-proxies(addresses and CIDR ranges, IPv4 and IPv6); then the entry ofX-Forwarded-For(orclient-address-header, such asCF-Connecting-IP) the first trusted proxy added, counting from the right. Without trusted proxies no header is read.hash-addresseswithhash-secretstores addresses as their HMAC-SHA-256.IpRangeis public. - The buckets live in the application's
RateLimitStore: a bean of its own, else the Supabase starter's database function, else the data starter's SQL store, else the first isolate's for a pool of isolates, else memory (spring.web.rate-limit.storenames one). A store that fails denies with 503 andRetry-Afterby default (on-store-failure: deny | allow, also per rule), with one log line that names the rule and never the key. - Fixed: the rate limiter counts an IPv6 client by the first 64 bits of its address (
spring.web.rate-limit.ipv6-prefix-length, 1 to 128;TrustedProxyClientAddressResolver(ipv6PrefixLength:)), the rest zeroed. Counted by its whole address, a client that changed address inside its /64 at every request never reached a limit keyed byipand filledmemory.max-entrieswith buckets of one request, pushing other clients' out.128counts every address by itself, as before. IPv4 addresses (also mapped into IPv6) are counted whole, and the trusted proxies are still compared by their whole address. - Fixed: a rate limit key such as
#{request.headers['X-Api-Key']}counts by the header:request.headersexists, and a header is found in any case inheaders[...]andrequest.headers[...](it was found only asheaders['x-api-key'], and the rule counted by address without a word). An expression that cannot be parsed fails the start with the rule's name; one that reads what does not exist (RateLimitKeyException, which aRateLimitKeyResolverof the application may throw too) counts by address and is logged once per rule at WARN onspring.web.ratelimit. A header the request does not have, or no user, counts by address as before, with no warning. - Fixed: a client that asks and does not read the response no longer holds its request for ever: a response none of whose bytes leave for
server.connection-timeout(60 s; counted per 64 KB of the body, and only while written bytes wait for the client) is given up, its connection dropped and its place ofserver.max-concurrent-requestsfree again. Before, a few such connections made every later request a 503, each kept its body in memory, and a graceful stop waited its whole timeout for them. A download of any size that keeps moving and a stream that is quiet between two events (server-sent events, NDJSON,addStreamof a slow producer) are not cut; a body larger than 64 KB is now handed todart:ioin slices, and what is written while aflushis under way waits for it instead of failing.0for the timeout turns it off, as for the request body. - Fixed: a request that shows both
Content-LengthandTransfer-Encodingis answered 400 withConnection: close, and the connection closes.dart:ioshows both only when the length comes first and the encoding is not written exactlychunked(Chunked,gzip, chunked); otherwise it drops theContent-Lengthitself and reads the body as chunked, and such a request is still served as a chunked one: a proxy in front must refuse them. - Changed:
server.request-timeoutis60sby default (it was not set): a request whose body arrives a little at a time, never idle, is answered 503 when the minute is over. Streams, event streams and WebSocket handshakes are not cut, as before;0turns it off.
0.7.4 #
- A pool of isolates serves the port (
server.isolates.count: a number orauto, one per core): each isolate runs the whole application with its own beans, the first one (main) starts the others (isolate-1, …), restarts one that ends unexpectedly and stops them with the context; every start, scaling step and failure is logged. One warning names the beans that keep state per isolate (IsolateLocalState: the in-memory sessions). TheIsolateScalerbean (scaleTo,scaleBy; in every isolate, the pool itself in the first and a bean that hands the step to it in the others) changes their number while the server runs, an isolate that leaves finishing its requests first (server.isolates.drain-timeout);server.isolates.scaling: autolets a policy do it betweenminandmax(LagScalingPolicy: by how late the isolates' event loops run;scale-up-lag,scale-up-after,scale-down-after,cooldown; anIsolateScalingPolicybean replaces it). - The requests in flight and taken are in the isolate's row of the task manager (
WebServerLoadSource,WebServerActivity). - The debug feature
qps(spring.web.debug.qps.enabled: true, without which the build has none of its code):RequestRateFiltercounts the requests of its isolate andRequestRatesworks out requests per second, p50/p95/p99 and errors for every isolate and in total eachspring.web.debug.qps.log-interval, logged onspring.web.qps, and answers the other isolates throughPrimaryIsolate. - A full server says so at once: past
server.max-concurrent-requests(event streams not counted) orserver.max-connectionsa request is answered 503 withRetry-After(server.retry-after) instead of waiting (past the connection limit the connection is closed too); no limit unless set. - The module is only where a server can run (
ModulePlatform.native): a browser build of an application that has the starter among its dependencies carries none of it. WebServerInitializedEventnames itself (eventName), readable in a release build.
0.7.3 #
- No changes of its own; released with the family version 0.7.3.
0.7.2 #
- README: the link goes to the package's own page on farum-azula.org, and what the README says was checked against the code and brought up to date.
- The package's page on pub.dev links its documentation, farum-azula.org (
documentationinpubspec.yaml).
0.7.1 #
Changes #
- Static resources, as Spring Boot's
ResourceHttpRequestHandler: the files oflib/resources/static/andlib/resources/public/(embedded by the generator) and offile:directories read at run time (an AOT executable's files, aflutter build weboutput) are served under/**, after the controllers.spring.web.resources.static-locations,add-mappings,cache.period,cache.use-last-modified,cache.cachecontrol.*,chain.compressed(precompressed.br/.gzwithContent-EncodingandVary: Accept-Encoding),spring.mvc.static-path-patternandserver.mime-mappings. Answers:Content-Typeby extension withX-Content-Type-Options: nosniff, a weakETagandLast-Modifiedwith304,Cache-Control,Range,HEAD;OPTIONSgetsAllow, other methods a 405;index.htmlis the welcome page at/for clients that take HTML.spring.web.resources.spa-fallback(this starter's own key) answers a browser's deep link of a single-page app withindex.html. WebMvcConfigurer.addResourceHandlerswithResourceHandlerRegistry/ResourceHandlerRegistration(locations,setCachePeriod,setCacheControl,setUseLastModified,setCompressed) adds mappings; one with the default's pattern replaces it.ResourceHttpRequestHandlerand theresourceHandlerMappingbean (ResourceHandlerMapping, orderOrdered.lowestPrecedence - 1) are public.- The static resources fail closed: a path is decoded once and refused (404) for dot segments, encoded or doubly encoded separators and dots, backslashes, invalid or overlong UTF-8, control characters,
;and empty segments, Windows' device names, short names, streams and trailing dots, look-alike characters,WEB-INF/META-INF, and dot files (except.well-known/, whoseapple-app-site-associationis sent asapplication/json). A file is resolved with its symbolic links and refused when it leaves its location or is not a regular file; directories are never listed. The global CORS rules apply to them; filters (the security chain) run before them. ResponseWriter.checkNotModified(Spring'scheckNotModified) is public, andwriteResourcetakesconditional: falsefor a caller that checked the conditions itself;If-Rangethen also matches a strongETag.- The handlers for the actuator's
mappingsendpoint, in Spring WebFlux's shape: thedispatcherHandlersMappingDescriptionsbean (DispatcherHandlersMappingDescriptions,dispatcherHandlers→webHandler) lists every handler of everyDescribableHandlerMappingof the dispatcher: the controllers' request mappings (predicateas Spring'sRequestMappingInfo.toString(),handler,details.handlerMethod,details.requestMappingConditions) and the static resources (ResourceWebHandler [...], the welcome page, the single-page app's fallback).describeRequestMappingwrites one entry of that shape. spring.web.resources.directory-index(this starter's own key, off by default): a path with no file whose folder holds anindex.htmlgets that file (/guideand/guide/getguide/index.html), beforespa-fallback, as static hosts answer; the pages ofspring.flutter.web.seo.*are served at their addresses this way. The file is looked up with the same checks as any static resource.- Fix: a
Rangeheader whose positions are not plain decimal digits (a sign, another base) is malformed and answered with the whole content; one such header could make a range that starts after the content and end the answer with an error instead of a response. - Fix:
Range: bytes=500-past the end of a resource is a 416, not the whole content.
0.7.0 #
- No changes of its own: its generated code (
lib/spring_gen/) is regenerated with spring_core_dart_generator 0.7.0.
0.6.3 #
Changes #
- The editor metadata of
server.*,spring.web.multipart.*,spring.mvc.*,spring.main.web-application-type,spring.test.web-environmentandlocal.server.portis made from code and the starter reads the same classes:ServerSettings(ssl,compression,websocket,session,forward-headers;Shutdown,ClientAuth,ForwardHeadersStrategyandSessionSameSiteare enums),MultipartSettings,MvcSettings,WebMainSettings,WebTestSettingsandLocalServerSettingsare bound by the Binder;ServerProperties.of,HttpSessionProperties.ofandMultipartProperties.ofbind them, and.frombuilds the settings from the bound classes. The hand-writtenspring_metadata_additional.jsonis gone.spring.mvc.log-request-detailsis now in the metadata; the constantswebEnvironmentPropertyandlogRequestDetailsPropertyare gone. A value that does not fit (a port that is not a number, an unreadableserver.session.max-sessions) now fails the binding naming the property.
0.6.2 #
- feat: 0.6.2 — the theme (typed keys and messages, states, every component, a theme from a URL), (#20)
0.6.1 #
- feat(flutter): the desktop window from properties — title bar, initia… (#18)
0.6.0 #
Breaking #
- Properties renamed:
spring.servlet.multipart.*isspring.web.multipart.*;server.servlet.context-pathisserver.context-pathandserver.servlet.session.*isserver.session.*(there is no servlet container). An old name stops the start, naming the new one. The Boot 1 keyserver.context-path, which was read whenserver.servlet.context-pathwas not set, is now the key itself.
Changes #
server.request-timeout, a deadline for every request (no limit by default,0or less: none; an extension, Spring Boot has no such key): the filters and the handler run under aRequestDeadlineof that length, and when it passes before the answer starts the answer is a503 Service Unavailableproblem (AsyncRequestTimeoutException, a generic detail, logged as a warning at most every 10 seconds). What the handler does afterwards is dropped (no second answer, no unhandled error); a response already committed is left alone; a response that becomes a stream (server-sent events,SseEmitter, a streamed body) leaves the deadline when it starts, and a WebSocket handshake is not timed. Code the request calls can read the deadline (RequestDeadline.current), and an error that ends a request after its deadline, or aRequestDeadlineExceededException, is a 503 instead of a 500.AsyncRequestTimeoutExceptiontakes an optional detail.HandlerExceptionResolver, Spring's extension point for turning an error into an answer: a bean returns anErrorResponse(status, headers and problem) ornullto pass the error on. The resolvers are asked in@Orderafter the@ExceptionHandlermethods of the controller and of the@ControllerAdvicebeans (the application's handlers always win) and before the default 500; not for an error that is already anErrorResponseor that a filter throws; a resolver that throws is logged and skipped. A library maps its exceptions to HTTP with it: withspring_boot_starter_dataamong the dependencies the generator adds one, so anOptimisticLockingFailureExceptionand aDuplicateKeyExceptionare a 409 and anEmptyResultDataAccessExceptiona 404 (see the data starter).- The framework logs its main steps as Spring does, so
logging.level.root=debug(orlogging.level.web=debug) shows what happens:GET "/api/books", parameters={masked},Mapped to BookController#search(),Completed 200 OKandResolved [Type: detail]for the dispatcher;N mappings in 'requestMappingHandlerMapping'at debug and each mapping at trace; created, invalidated and re-keyed sessions (never their ids); the forwarded headers applied (scheme and host only); the parts and bytes of a multipart request. Parameters show asmasked, and headers (trace) as{masked}, unlessspring.mvc.log-request-details=true; even thenAuthorization,Cookie,Set-Cookieand any header or parameter whose name containstoken,secret,key,passwordorsessionstaymasked. Paths, parameter values and other client text go throughLogFormatUtils.formatValue: line breaks show as<EOL>. The query string is not logged in the request line (parameters are, when allowed), unlike Spring.
Fixes #
@RequestParamand@RequestHeaderon aMap(every query parameter or header) answered 500 when the map was typed (Map<String, String>,Map<String, List<String>>,Map<String, int>): the map is now built with the parameter's own key and value types; the same for a form read into aMapwith@RequestBody.
0.5.0 #
Breaking #
@CrossOrigin()withoutmethodsallows only the method the handler is mapped to, as in Spring (it allowedGET,HEADandPOST): a cross-originHEADto a@GetMappingneedsmethods: ['GET', 'HEAD'].- Every cross-origin request is checked as Spring's
DefaultCorsProcessorchecks it, its own method included: an allowed origin'sDELETE,PUT,HEADorOPTIONSthat the rules do not list is a 403 before the handler runs, with or without a pre-flight. - Only the bean named
corsConfigurationSourceis a CORS source, as in Spring Security (aCorsConfigurationSourcebean of another name is ignored, and several such beans no longer fail the start). It is no longer combined with@CrossOriginor theWebMvcConfigurermappings: where it has a configuration for a request, that configuration alone applies, with and without the security starter. Where it has none,@CrossOriginand the mappings apply. - Answers whose type the app didn't set have no
Content-Type(dart:io'stext/plain; charset=utf-8default is gone); 1xx, 204 and 304 answers have noContent-LengthorTransfer-Encoding, a 304 or 1xx noContent-Type, and a body written to them is dropped, as Tomcat does. *in the allowed origins together withallowCredentialsorallowPrivateNetwork, also inside a comma-separated value, stops the startup for a@CrossOriginand makes the requests a 500 for a mapping or a bean, as in Spring.- CORS origin patterns are compared with case (origins without), by
AllowedOrigins. - Every answer of a handler with CORS rules gets
Vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers, a CORS request or not, as Spring adds it; a handler's ownVary(of aResponseEntityor anErrorResponse) is merged with these names instead of replacing them. - A pre-flight to a mapped path without CORS rules, and one from the server's own origin, gets a 200 without CORS headers (was a 403), as in Spring; a pre-flight for a method no handler of the path maps is decided by the global rules alone (a 403 when they refuse it, never a 405).
- An
Origin, or a pre-flight's requested method or headers, with a character outside visible US-ASCII is a 403 (was a 500 with a stack trace). - A
ResponseEntitywith a status of 200 and anETagorLast-Modifiedanswers a conditionalGETorHEADwith a 304 (or a 412 forIf-Unmodified-Since), as Spring'sHttpEntityMethodProcessor. - A
@RequestBodyobject in a request without aContent-Typeis a 415, as Spring reads such a body asapplication/octet-stream(it was read as JSON); aContent-Typethat is not a media type is a 415 too. server.max-http-request-body-sizelimits every body,multipart/*ones included (the media type is checked before the body is read); only the multipart resolver reads uploads withspring.servlet.multipart.max-request-sizeinstead.- A multipart request may have at most 50 parts (
spring.servlet.multipart.max-part-count,-1: no limit; Tomcat's default in Boot 4); more is a 413. - The server answers a 400 before any filter, as Tomcat does, for an encoded
/,\or NUL in the path (%2F,%5C,%00), a.or..segment behind matrix parameters (/files/..;/secret), a%escape in the path or the query that is not UTF-8, and a malformed or missingHost(or an absolute target naming another host); a form with a malformed%escape is a 400 too. - WebSocket server sessions read at most 8 KB per message, as Tomcat in Spring (
server.websocket.max-text-message-sizeandmax-binary-message-size; above, the session closes with 1009), negotiate no permessage-deflate, and drop a client that takes nothing past 512 KB waiting or 10 seconds (server.websocket.send-buffer-size-limitandsend-time-limit; 4500), as Spring'sConcurrentWebSocketSessionDecorator. @ControllerAdvicebeans are tried in@Order, as in Spring: the first bean with a handler for the error answers it, even when a later bean has a more specific one.- A request body that sends nothing for
server.connection-timeout(60 s, Tomcat's default;0or less: no limit) ends with a 408, and idle keep-alive connections close after the same time. - At
server.servlet.session.max-sessionsthe in-memory repository removes every expired session and, when it is still full, refuses the new session with aTooManyActiveSessionsException(503), as WebFlux'sInMemoryWebSessionStoredoes; a live session is never pushed out for a new one. The constantsInMemoryHttpSessionRepository.loginAttribute,principalNameAttributeandprincipalKeyAttributeare removed. The security starter creates a session only at a login, so anonymous requests cannot fill the store.
Changes #
server.forward-headers-strategy(nativeorframework, Spring Boot's) addsForwardedHeaderFilter, first of all filters: behind a reverse proxy the request gets the scheme, host, port and client address ofForwarded(RFC 7239) orX-Forwarded-Proto,-Host,-Portand-For, so cookies getSecurebehind a TLS proxy and redirect URIs arehttps://. Only from the proxies ofserver.forward-headers.trusted-proxies(loopback and private networks by default, as Tomcat'sRemoteIpValve; Spring's filter believes every peer); the client's address is the first from the right that is not a trusted proxy; invalid values are ignored; the headers are removed for the rest of the chain.X-Forwarded-Prefixis not read.- The private directory of the uploads' temporary files is
rwx------on Linux too (dart:io'screateTempmade itrwxr-xr-xthere, readable by every user of the machine; on macOS it was already private). When it can't be made private, the upload fails. DispatcherHandler.corsConfigurationFor(request)gives the CORS rules of the mapping that would take a request, in the dispatcher's order (Spring'sHandlerMappingIntrospector): a WebSocket handshake gets thecorsConfigurationSourcebean's rules or none, never theWebMvcConfigurermappings.- A port in use fails the start, as in Spring Boot: the application waits for the server to listen before the
ApplicationStartedEvent, the runners and theApplicationReadyEvent,runAsyncthrows thePortInUseException, and the program ends with a non-zero exit code. - Graceful shutdown lets running requests finish within
spring.lifecycle.timeout-per-shutdown-phasebefore the beans are destroyed (the lifecycle processor now has that timeout too). - An upload that fails inside a part (a limit, a broken body, a client that went away) is answered (413 or 400) instead of hanging, and its temporary files are deleted at once.
- Uploads go to a private directory of the process (
0700, random file names), made again when the system cleans its temporary directory. @CrossOrigindefaults no longer widen the global CORS rules, as Spring's default markers:@CrossOrigin(methods: ['PUT'])under/api/**keeps the global origins and addsPUT.allowPrivateNetworkon@CrossOrigin,CorsConfigurationandCorsRegistrationanswers Chrome's Private Network Access pre-flights withAccess-Control-Allow-Private-Network: true;CorsConfiguration.validateAllowCredentials()andvalidateAllowPrivateNetwork()are Spring's checks.- CORS origins are checked by
AllowedOrigins: port lists (http://localhost:[3000,3001],[*]), comma-separated values and a trailing/, as in Spring. Differs from Spring: anOriginlonger than 1024 characters is never allowed (a pattern with several*froze the server on a largeOrigin). - A pre-flight is answered from the CORS rules of the first handler of its path and method, and an actual request from those of the handler that answers it, chosen with all its conditions. Differs from Spring when several handlers match a pre-flight equally: Spring allows it from any origin, here the other handlers' origins get a 403 (give such handlers the same rules).
- Event streams (
Stream,EventStream, NDJSON) are paused while an event is written, so a client that reads slowly slows the stream down instead of filling the server's memory; anSseEmitterwhose unawaited sends reach 1000 for a client that reads nothing fails the nextsendwith aStateErrorand ends. ResponseEntity<SseEmitter>,ResponseEntity<EventStream<T>>andResponseEntity<Stream<T>>write their events with the entity's status and headers.- Compression covers every response of
server.compression.mime-types(Spring Boot's list) of at leastserver.compression.min-response-size(2 KB), not only byte streams; never one with a strongETag; and every answer that could be compressed getsVary: Accept-Encoding, also for a client without gzip, as Tomcat. - A body the handler does not read (an upload answered with a 413 or 415) gets its answer first; then up to 2 MB are read and dropped, for at most 5 seconds, as Tomcat's
max-swallow-size, so the connection can serve the next request. - A handler that fails after the response was committed drops the connection without finishing the response, as Tomcat does (the response looked complete).
- A response header
dart:iocannot send (non-ASCII, a line break) is dropped and the error answered with a 500 problem (was an empty 200). - The server answers the WebSocket handshake itself: a missing, repeated or malformed
Sec-WebSocket-Keyis a 400, anotherSec-WebSocket-Versiona 426. - A 5xx answer an exception asks for (a
ResponseStatusException, the 503 of a refused session) is logged as a warning without a stack trace, at most once every 10 seconds for the same kind; an unexpected exception is logged with its stack trace. ServerPropertieshas the new settings:compressionMimeTypes,compressionMinResponseSize,connectionTimeout,webSocketMaxTextMessageSize,webSocketMaxBinaryMessageSize,webSocketSendBufferSizeLimit,webSocketSendTimeLimit.
0.4.3 #
- Flutter security (#15)
- feat: single sign-on with OAuth 2.0 / OpenID Connect (spring_boot_sta… (#11)
- docs: the READMEs and docs/ rewritten: what it is, why and when you need it, an example, then Spring (#10)
0.4.2 #
- Docs (#9)
0.4.1 #
- feat: guides replace the examples; optional parameters from Dart nullability; coloured logs
- feat: guides replace the examples; optional parameters from Dart nullability; coloured logs
0.4.0 #
HttpSession:request.getSession(), an in-memoryHttpSessionRepositorywith expiry and a limit (server.servlet.session.timeout,.max-sessions,.cookie.*;SameSite=Laxby default),changeSessionId(); the session cookie is written byHttpSessionFilter.@RequestParamreads the fields ofapplication/x-www-form-urlencodedbodies too, like Spring MVC (readFormParameters).- A request target starting with
//is no longer read as a host bydart:io: the path keeps its//(and is answered 404, or refused by the security starter's firewall).
0.3.2 #
- Initial version: Spring MVC for Dart.
@RestControllerclasses with@GetMapping,@PostMapping, ... ondart:io'sHttpServer(server.*properties), path variables, request parameters, headers and cookies, JSON bodies through theObjectMapper,@Validbodies,ResponseEntity, errors asProblemDetailwith@ExceptionHandlerand@RestControllerAdvice, server-sent events (EventStream,SseEmitter), filters, interceptors, CORS, WebSocket endpoints ofspring_boot_starter_websocketon the same server;MockMvcandspringBootTest(webEnvironment:)inspring_boot_starter_test.