Commit Graph

18635 Commits (a0735eb3fbf3d418c1689d734f002bb80485ec0a)

Author SHA1 Message Date
Brian Clozel a0735eb3fb Migrate remaining usage of httpclient API
This commit migrates our remaining usage of the httpclient 4.x to use
instead httpclient5, now that the 4.x support has been removed in
`RestTemplate`.

Closes gh-32461
2 years ago
Brian Clozel cc169e7623 Adapt TestRestTemplate to httpclient5 changes
This commit adapts the `TestRestTemplate` implementation to the
httpclient5 API since httpclient 4.x is now unsupported in Spring
Framework.

See gh-32461
2 years ago
Brian Clozel 3ac034e18a Fail when setReadTimeout on httpclient5 request factory
Prior to this commit, the `RestTemplateBuilder` would offer a generic
`setReadTimeout` method to configure the read timeout on the underlying
`ClientHttpRequestFactory`. This would be done in a reflective fashion,
considering that all implementations align with this behavior.

This option cannot be provided for HttpClient5 at the
`ClientHttpRequestFactory` level anymore, so this has been deprecated
in Spring Framework 6.0 and will log a warning. In order to align with
our existing behavior (throwing exceptions if the option cannot be set),
this commit ensures that exceptions are also thrown if the method is
marked as deprecated.

See gh-32461
2 years ago
Brian Clozel 58f3054624 Adapt RestTemplate factory auto-detection
This commit adapts the auto-detection of `ClientHttpRequestFactory` to
look for an httpclient5 class.

See gh-32461
2 years ago
Brian Clozel 5fb2a50ad0 Adapt build dependencies to httpclient5
As htttpclient 4.x is not supported anymore by `RestTemplate`, this
commit changes such dependencies to httpclient5 instead. In some cases,
the httpclient 4.x was transitively brought by a non-Spring dependency.

See gh-32461
2 years ago
Stephane Nicoll 3702c71fc1 Adapt to Spring AOT changes 2 years ago
Stephane Nicoll d478a020df Start building against Spring Framework 6.0.0-RC1 snapshots
See gh-32550
2 years ago
dreis2211 65ef8fc51a Use ByteArrayOutputStream.toString where possible
See gh-32534
2 years ago
Andy Wilkinson 17953eeb33 Merge branch '2.7.x'
Closes gh-32544
2 years ago
Andy Wilkinson 3ef633b096 Merge branch '2.6.x' into 2.7.x
Closes gh-32543
2 years ago
Andy Wilkinson 84a25c7dcf Configure Log4j2 classpath overrides consistently
Closes gh-32537
2 years ago
Andy Wilkinson f10d696c46 Merge branch '2.7.x'
Closes gh-32536
2 years ago
Andy Wilkinson 9f5b7db553 Merge branch '2.6.x' into 2.7.x
Closes gh-32535
2 years ago
Andy Wilkinson be48f37a83 Fix LogbackMetrics auto-config test with Logback and Log4j2 on cp
Closes gh-32533
2 years ago
dreis2211 388134713e Remove unused MockReactiveWebServerFactory
See gh-32526
2 years ago
dreis2211 f0b4a65546 Avoid usage of StringBuffer where possible
See gh-32519
2 years ago
Andy Wilkinson 0bfa9cd704 Upgrade to Logback 1.4 and SLF4J 2.0
Closes gh-12649
2 years ago
Andy Wilkinson 574242b44f Polish "Break cycles between Zipkin senders and HTTP client observation"
See gh-32528
2 years ago
Marcin Grzejszczak b41ed44b60 Break cycles between Zipkin senders and HTTP client observation
Previously, RestTemplateBuilder and WebClient.Builder beans were used
to create the HTTP client for sending out spans. Those same beans are
also instrumented for observability which results in a cycle.

This commit breaks the cycle by not using the application-web
builders to create the RestTemplate and WebClient's used by the Zipkin
senders. Instead, builders are created inline, with new callbacks
being introduced to allow the user to customize these Zipkin-specific
builders.

See gh-32528
2 years ago
Andy Wilkinson 8c74b62888 Polish "Prefer WebClient to RestTemplate for Zipkin's Sender"
See gh-32529
2 years ago
Marcin Grzejszczak cd3b3d468a Prefer WebClient to RestTemplate for Zipkin's Sender
Previously, a Webclient-based sender was only for reactive web
applications, falling back to a RestTemplate-based sender in all
other cases.

With this commit we now prefer to use WebClient if it is available,
irrespective of the web application type. The assumption is that
if the user has WebClient on the classpath, it's either a reactive
web application, or it's a servlet web application or non-web
application but WebClient is preferred.

See gh-32529
2 years ago
Brian Clozel b325edbc55 Polish
See gh-32484
2 years ago
Brian Clozel eac50a8f0c Auto-configure Observation support for RestTemplate
Prior to this commit, Spring Boot would auto-configure a customizer that
instruments `RestTemplate` through a `RestTemplateBuilder`. This would
install a request interceptor that instrumented client exchanges for
producing metrics.

As of spring-projects/spring-framework#28341, the instrumentation is
done at the `RestTemplate` level directly using the `Observation` API.
The `Tag` (now `KeyValue`) extraction, observation name and
instrumentation behavior now lives in the Spring Framework project.

This commit updates the auto-configuration to switch from Boot-specific
Metrics instrumentation to a generic Observation instrumentation.
As a migration path, some configuration properties are deprecated in
favor of the new `management.observations.*` namespace.

Closes gh-32484
2 years ago
Andy Wilkinson 36a4b36ccb Polish "Add support for MDC, Context Propagation (via B3 and W3C), and Baggage"
See gh-32480
2 years ago
Marcin Grzejszczak 52d1436dc6 Add support for MDC, Context Propagation (via B3 and W3C), and Baggage
See gh-32480
2 years ago
Brian Clozel bf5bd4f91c Upgrade to SnakeYAML 1.33
Closes gh-32522
2 years ago
Andy Wilkinson 243075d3b2 Disable DevTools during AOT processing
Closes gh-32517
2 years ago
Andy Wilkinson 5449397463 Require micrometer-tracing-bridge-otel to auto-configure OTel
Closes gh-32503
2 years ago
Andy Wilkinson 6cc3619675 Require micrometer-tracing-bridge-brave to auto-configure Brave
Closes gh-32502
2 years ago
Stephane Nicoll fcafd2abdb Merge branch '2.7.x'
Closes gh-32516
2 years ago
Stephane Nicoll cb191dfec2 Merge branch '2.6.x' into 2.7.x
Closes gh-32515
2 years ago
heqiang 5db6cc1cba Remove redundant @ExtendWith(SpringExtension.class) for sample
See gh-32476
2 years ago
Stephane Nicoll bac1bfcd1c Merge branch '2.7.x'
Closes gh-32514
2 years ago
Stephane Nicoll eb4b0a3f3c Merge branch '2.6.x' into 2.7.x
Closes gh-32513
2 years ago
Stephane Nicoll 8f598f876b Polish "Use non-blocking API in CouchbaseReactiveHealthIndicator"
See gh-32505
2 years ago
Mico Piira f51c4c3df0 Use non-blocking API in CouchbaseReactiveHealthIndicator
See gh-32505
2 years ago
Stephane Nicoll f6f545dbf1 Merge branch '2.7.x'
Closes gh-32510
2 years ago
Stephane Nicoll 33680e5acc Merge branch '2.6.x' into 2.7.x
Closes gh-32509
2 years ago
Stephane Nicoll 0457536d72 Polish "Avoid using JUnit 4 assertions"
See gh-32504
2 years ago
dreis2211 cee353fba6 Avoid using JUnit 4 assertions
See gh-32504
2 years ago
Andy Wilkinson 0f44e69995 Merge branch '2.7.x'
Closes gh-32500
2 years ago
Andy Wilkinson 5124ae94ae Merge branch '2.6.x' into 2.7.x
Closes gh-32499
2 years ago
Andy Wilkinson cfac7f55a4 Correct annotations on BootBuildImage's file-based inputs
Closes gh-32495
2 years ago
Andy Wilkinson f9b12ca01a Upgrade to Log4j2 2.19.0
Closes gh-32498
2 years ago
Andy Wilkinson 7d583939ff Auto-configure stream template and env irrespective of listener type
Closes gh-32477
2 years ago
Andy Wilkinson 9d30de9966 Exclude all tools projects from the aggregated javadoc
Closes gh-31955
2 years ago
Andy Wilkinson f67db3d9ad Move spring-boot-cli into spring-boot-tools
Closes gh-32492
2 years ago
Johnny Lim 7f36fb155d Polish JavaVersionTests.currentJavaVersionNineteen()
See gh-32489
2 years ago
Andy Wilkinson 4a05230d5d Move spring-boot-properties-migrator into spring-boot-tools
Closes gh-32491
2 years ago
Stephane Nicoll bd8f53a989 Use Native Build Tools new goal name
Closes gh-32482
2 years ago