spring_boot_starter_feign 0.4.0
spring_boot_starter_feign: ^0.4.0 copied to clipboard
Feign clients for spring_boot_dart: annotate an interface with @FeignClient and @GetMapping, inject it as a bean; JSON via ObjectMapper, interceptors, retries, fallbacks.
0.4.0 #
- feat: spring_security_core, spring_boot_starter_security and a CI quality gate
0.3.2 #
- feat: hot reload on the Dart VM, flutter_notes example, fixes for example resources and workspace builds
- feat: spring_boot_starter_web, WebSocket server endpoints, uploads and downloads
0.3.1 #
- Brings logging, like every Spring Boot starter: depends on and re-exports
spring_boot_starter_logging(and through itspring_boot_dartandspring_core_dart), so the starter is the only dependency an application lists, and one import gives everything. An application using it now gets the logging system (Boot's console format,logging.*properties) without adding the logging starter;logging.enabled=falseturns it off. - The example is a Spring Boot application: a
@FeignClientagainst a local server (a book, a 404 asnull, a search, an event stream). - Tests take
MockHttpTransportfromspring_boot_starter_test(README). spring_auto_configuration.dartre-exports the logging starter's (and through itspring_boot_dart's) auto-configuration, so a test namingspringBootAutoConfiguration(ApplicationContextRunner) needs no other dependency.
0.3.0 #
- feat(spring_boot_starter_flutter): themes from properties, free reads in Spring widgets
0.2.3 #
- add spring application handling
- docs(spring_boot_starter_flutter): add an example for pub.dev
0.2.2 #
- ci: run only the tests of the packages a change affects
0.2.1 #
- feat: spring_boot_starter_flutter, @Log, --dart-define properties, Flutter counter example
0.2.0 #
- the auto-configured
httpTransportbacks off for anHttpTransportregistered by an@ImportedBeanRegistrar/ImportBeanDefinitionRegistrarof the application (two transports failed the start); its condition is decided when the auto-configuration is read, like Boot'sOnBeanCondition dismiss404,follow-redirects,event-stream.reconnectandspring.cloud.openfeign.client.decode-slashtake true / false in any case (and on / off, yes / no, 1 / 0); anything else fails naming the key (yeswas off fordismiss404,nopewas on for the others).- Form bodies: with
consumes: application/x-www-form-urlencoded(or thatContent-Typeheader) aMapor object body is sent asname=value&...like Spring Cloud OpenFeign'sSpringFormEncoder(it was sent as JSON). Future<ResponseEntity<void>>ignores the body (a non-JSON body failed the call).Future<HttpResponse>returns the raw response for any status, without error decoding, like Feign'sResponse.- A
request-interceptorsbean that is also aRequestInterceptorbean of the context runs once. @FeignClient(configuration: [...]): theRetryer,ErrorDecoderandRequestInterceptorbeans of the listed@Configuration()classes apply to that client only (and never reach the other clients); propertiesretryer,error-decoderandrequest-interceptorsofspring.cloud.openfeign.client.config.<name>(bean or class names) win over them.- Breaking:
default-request-headersis aMap<String, List<String>>and bothdefault-request-headersanddefault-query-parametersare bound through the Binder:X: a,band YAML lists (X[0],X[1]) give several values (lists were sent as a headerX.0). - Breaking:
DefaultRetryerwaits 150 ms, 225 ms, ... (period × 1.5^attempt) like Feign'sRetryer.Default(it started at 100 ms). - Breaking:
BasicAuthRequestInterceptorencodes ISO-8859-1 like Feign (encoding: utf8for other characters). - A client
urlwithout a scheme getshttp://;@FeignClient(url: '')(or a placeholder resolving to empty) falls back to theurlproperty. - A query written in a mapping path (
@GetMapping('/items?type=a%20b&flag')) is sent as written; the call's parameters are appended. - Breaking:
FeignClientFactorylooks up the interceptors, error decoder and retryer per client; itsinterceptors/errorDecoder/retryerarguments are optional overrides.
0.1.7 #
@GetMapping()without a path calls theurlandpathof the client itself.requiredanddefaultValueof@RequestParam/@RequestHeaderandrequiredof@PathVariable:defaultValueis sent for anullargument; a requirednullfails the call with anArgumentErrornaming the parameter before anything is sent; anullthat is not required leaves a query parameter or header out (a path variable becomes an empty string).spring.cloud.openfeign.client.config.*keys with relaxed names, like Spring Cloud OpenFeign's binding:readTimeout,loggerLevel,defaultRequestHeaders.X-Shop,read_timeout, environment variables- Breaking:
Mapparameters of@RequestParam/@RequestHeadergive one query parameter / header per entry (they were sent as JSON); an object as the value of a path variable, query parameter, header or cookie (a class written as a JSON object) stops the application at startup, or fails the call with anEncodeExceptionwhen only the value tells. - Breaking: mapping
headersuse Spring's'Name=value'(as Spring Cloud OpenFeign reads them; server conditions like'!Name'are ignored);'Name: value'stops the application with the reason. - Breaking:
read-timeoutis the longest wait for data (for the response, then between two chunks of the body), not a limit for the whole call; defaultread-timeout60 s andconnect-timeout10 s, like Feign'sRequest.Options()(0for none). - Breaking:
RequestTemplate.headeradds a value like Feign's (it replaced); newremoveHeader. Interceptors run for every attempt of a call on a new template (a refreshed token reaches the retry);default-request-headers(and the defaultAccept) are applied after the interceptors, for names they did not set. - Breaking:
dismiss404keeps throwing forvoidmethods, like Feign. - Breaking: the
<--- ERRORand---> RETRYINGlog lines are written only abovelogger-level: none. @FeignClient(contextId:, qualifiers:, primary:, dismiss404:)like Spring Cloud OpenFeign (primaryandqualifiersneed the matching generator).default-query-parameters.<name>,follow-redirects,spring.cloud.openfeign.client.decode-slash(defaulttrue: a/in a path variable stays a/).@CookieValueparameters (oneCookieheader).DefaultErrorDecoderreadsRetry-Afteras an HTTP date too.- README: more "Differences from Spring Cloud OpenFeign" (default
Accept, spaces as+, maskedAuthorization, logger names).
0.1.6 #
- update road map
- ci: release with a button on main, skip new packages when publishing; shorter pubspec descriptions
0.1.5 #
- Initial version: @FeignClient interfaces with request mapping annotations, JSON through ObjectMapper, interceptors, error decoding, retries, fallbacks, spring.cloud.openfeign.client.config.* properties.
- Server-sent events: methods returning
EventStream<T>(orStream<T>) readtext/event-streamresponses, decode each event's data, reconnect withLast-Event-ID(event-stream.*properties; not in Spring Cloud OpenFeign).