Commit Graph

1431 Commits

Author SHA1 Message Date
Hatef Palizgar 9b2e13aace Allow remote devtools access with Spring Security
Update `ManagementWebSecurityAutoConfiguration` so that the
`managementSecurityFilterChain` bean has an explicit order.

Prior to this commit, the `managementSecurityFilterChain` would override
the `securityFilterChain` in `RemoteDevtoolsSecurityConfiguration` which
would prevent the remote devtools endpoint from being accessed.

See gh-25868
2021-05-17 16:51:18 -07:00
Stephane Nicoll d3c817b7ba Polish "Remove unnecessary throws declaration in tests"
See gh-26441
2021-05-17 09:36:53 +02:00
weixsun 8a2be288a3 Remove unnecessary throws declaration in tests
See gh-26441
2021-05-17 09:31:51 +02:00
Phillip Webb 83668f96af Merge branch '2.4.x'
Closes gh-26458
2021-05-13 23:38:41 -07:00
Phillip Webb 73131e99da Make BufferingApplicationStartup thread safe
Update `BufferingApplicationStartup` to use thread safe data structures.

Prior to this commit, it was possible for calls from different threads
(for example due to request scope beans) to cause a
NoSuchElementException to be thrown.

Closes gh-25792
2021-05-13 23:35:36 -07:00
Phillip Webb 87d8aedd3c Use spring-pdf backend for PDF generation
Update `asciidoctorPdf` tasks to use the `spring-pdf` backend so that
chomped elements and @fold:on/@fold:off comments are hidden.

Closes gh-26373
2021-05-10 18:04:05 -07:00
izeye 996472b42d Polish
See gh-26145
2021-04-19 09:34:55 +02:00
Phillip Webb beaf03a008 Update copyright year of changed files 2021-04-15 12:22:48 -07:00
izeye e27c85698d Polish
See gh-26135
2021-04-15 16:31:10 +02:00
izeye fb5a1270e8 Add RepositoryMetricsAutoConfiguration to spring.factories
See gh-26134
2021-04-15 16:27:49 +02:00
Andy Wilkinson 0a8da4fd7d Polish "Provide health for an AbstractRoutingDataSource's resolved targets"
See gh-25708
2021-04-10 11:12:10 +01:00
bono007 13600c3367 Provide health for an AbstractRoutingDataSource's resolved targets
See gh-25708
2021-04-10 11:12:01 +01:00
Phillip Webb f03f74ff0a Add Spring Data Repository metrics support
Add support for Spring Data Repository metrics by integrating with
Spring Data's new `RepositoryMethodInvocationListener` support.

Closes gh-22217
2021-04-09 23:49:25 -07:00
izeye 98b0b6c4c5 Fix MongoMetricsAutoConfigurationTests
See gh-25952
2021-04-09 14:20:41 +02:00
Stephane Nicoll d50e581403 Start building against Micrometer 1.7.0-RC1 snapshots
See gh-25934
2021-04-09 13:44:32 +02:00
Brian Clozel b4d2207902 Merge branch '2.4.x'
Closes gh-25936
2021-04-08 17:45:42 +02:00
Brian Clozel a0ee0601ef Fix SSL configuration with Reactor Netty
Prior to this commit, the SslServerCustomizer would use a Reactor Netty
API that lets users customize the SSL configuration, but later override
some of the choices with defaults.

This commits moves from the new deprecated Reactor Netty API and instead
uses a new variant that builds the defaults and lets developers override
them if they want to.

Fixes gh-25913
2021-04-08 17:09:31 +02:00
Phillip Webb e4164d0143 Fix package tangle in endpoint package
Fix package tangle in the actuator endpoint package by relocating a
few classes.

The `Producible` and `ProducibleOperationArgumentResolver` classes have
been moved from `endpoint.annotation` to `endpoint` since they aren't
directly tied to annotations.

The `ApiVersion` class has been moved from `endpoint.http` to
`endpoint` since it needs to implement `Producible` and isn't really
tied to HTTP.

Closes gh-25914
2021-04-07 16:54:37 -07:00
Phillip Webb 807ea1af0d Update copyright year of changed files 2021-04-06 14:59:52 -07:00
Andy Wilkinson 73e1dd8728 Polish "Auto-configure Mongo metrics"
See gh-23990
2021-04-06 18:15:09 +01:00
bono007 81c18214d1 Auto-configure Mongo metrics
See gh-23990
2021-04-06 16:58:39 +01:00
Andy Wilkinson ef986b13e5 Polish Quartz endpoint documentation
See gh-10364
2021-04-06 16:56:17 +01:00
Stephane Nicoll b11602aeaa Polish "Add Quartz actuator endpoint"
This commit reworks the initial proposal so that jobs and triggers are
treated as first class concepts.

`/actuator/quartz` now returns the group names for jobs and triggers.

`actuator/quartz/jobs` returns the job names, keyed by the available
group names, while `/actuator/quartz/triggers` does the same for
triggers.

`/actuator/jobs/{groupName}` provides an overview of a job group. It
provides a map of job names with the class name of the job.
implementation

`/actuator/triggers/{groupName}` provides an overview of a trigger
group. There are five supported trigger implementations: cron, simple,
daily time interval, calendar interval, and custom for any other
implementation. Given that each implementation has specific settings,
triggers are split in five objects.

`/actuator/jobs/{groupName}/{jobName}` provides the full details of a
particular job. This includes a sanitized data map and a list of
triggers ordered by next fire time.

`/actuator/triggers/{groupName}/{triggerName}` provides the full details
of a particular trigger. This includes the state, its type, and a
dedicate object containing implementation-specific settings.

See gh-10364
2021-04-06 12:13:28 +02:00
Vedran Pavic 9795061360 Add Quartz actuator endpoint
See gh-10364
2021-04-06 11:36:54 +02:00
Andy Wilkinson 029f1b52b3 Merge branch '2.4.x'
Closes gh-25867
2021-04-01 16:51:42 +01:00
Andy Wilkinson ba28f21e27 Merge branch '2.3.x' into 2.4.x
Closes gh-25866
2021-04-01 16:51:31 +01:00
Andy Wilkinson cbf37b3a8b Use main as the branch name in info endpoint example
Closes gh-25865
2021-04-01 16:46:37 +01:00
Phillip Webb 8c31d29acf Merge branch '2.4.x' 2021-03-30 09:29:59 -07:00
Phillip Webb a28a3ae090 Merge branch '2.3.x' into 2.4.x 2021-03-30 09:25:46 -07:00
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
2021-03-30 09:20:30 -07:00
Phillip Webb 44b1751bb4 Merge branch '2.4.x'
Closes gh-25826
2021-03-29 15:48:20 -07:00
Phillip Webb 363f5829d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25825
2021-03-29 15:46:50 -07:00
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
2021-03-29 15:44:58 -07:00
Andy Wilkinson 90b4ced7a6 Move DataSource init auto-config out of DataSourceAutoConfiguration
Previously, the auto-configuration for DataSource initialization and
the properties used to configure it were part of the general
DataSource auto-configuration and properties.

This commit moves the auto-configuration of DataSource initialization
out into a separate top-level auto-configuration class. Similarly,
the properties for configuring DataSource initialization have been
moved from `spring.datasource.*` into `spring.sql.init.*`.

The old initialization-related `spring.datasource.*` properties have
been deprecated but can still be used. When they are used, they new,
separate initialization auto-configuration will back off. In other
words, the initialization related `spring.datasource.*` properties
and the `spring.sql.init.*` properties cannot be used in combination.

Closes gh-25323
2021-03-24 14:57:29 +00:00
Phillip Webb 11a94ee6f0 Merge branch '2.3.x' into 2.4.x 2021-03-23 12:52:07 -07:00
Phillip Webb 82127fdaa3 Update copyright year of changed files 2021-03-23 12:50:49 -07:00
Andy Wilkinson ce3dfc5792 Merge branch '2.4.x'
Closes gh-25767
2021-03-23 13:42:15 +00:00
Andy Wilkinson 33cf8b3bc4 Merge branch '2.3.x' into 2.4.x
Closes gh-25765
2021-03-23 13:06:35 +00:00
Andy Wilkinson bf6f36a783 Apply any root URI to RestTemplate metric's URI tag
Previously, a root URI configured via RestTemplateBuilder's rootUri
method and RootUriTemplateHandler was not taken into account when
generated the URI tag for RestTemplate request metrics.

This commit updates MetricsClientHttpRequestInterceptor to be aware
of RootUriTemplateHandler and capture the URI template once the
root URI has been applied.

Fixes gh-25744
2021-03-23 13:05:54 +00:00
Andy Wilkinson 11b4a19dee Support OpenMetrics text format with Prometheus
Update `PrometheusScrapeEndpoint` so that it can produce both classic
Prometheus text output as well as Openmetrics output.

See gh-25564
2021-03-18 20:50:40 -07:00
Phillip Webb 663fd8ce5e Update copyright year of changed files 2021-03-18 14:49:52 -07:00
Stephane Nicoll 1111b3db98 Polish 2021-03-18 09:10:42 +01:00
Stephane Nicoll 8808d5e4c0 Polish "Support sending metrics to InfluxDB v2"
See gh-25721
2021-03-17 15:56:04 +01:00
Tommy Ludwig 8eb73bcf01 Support sending metrics to InfluxDB v2
See gh-25721
2021-03-17 15:14:43 +01:00
Stephane Nicoll 6f9352bda9 Fix description of management.metrics.export.influx.db
Closes gh-25723
2021-03-17 15:09:37 +01:00
Stephane Nicoll 91c3c7276b Merge branch '2.4.x'
Closes gh-25725
2021-03-17 15:08:47 +01:00
Stephane Nicoll 42994349fe Merge branch '2.3.x' into 2.4.x
Closes gh-25724
2021-03-17 15:08:32 +01:00
Stephane Nicoll 446e838b1b Fix description of management.metrics.export.influx.db
Closes gh-25723
2021-03-17 15:07:02 +01:00
Stephane Nicoll eb406867ea Polish "Upgrade to Micrometer 1.7.0-M1"
See gh-25707
2021-03-17 11:28:52 +01:00
Jonatan Ivanov 7c5e0505d8 Upgrade to Micrometer 1.7.0-M1
See gh-25707
2021-03-17 11:12:25 +01:00
Stephane Nicoll e517ee8635 Merge branch '2.4.x'
Closes gh-25618
2021-03-13 18:22:57 +01:00
izeye 09f4d4b9bf Polish
See gh-25617
2021-03-13 18:08:54 +01:00
Phillip Webb 6e5c510e0a Migrate to asciidoctor-spring-backends
Migrate to the snapshot version of asciidoctor-spring-backends.

See gh-25553
2021-03-08 22:07:17 -08:00
Stephane Nicoll adaf2fc57c Merge branch '2.4.x'
Closes gh-25536
2021-03-08 08:48:41 +01:00
dreis2211 2575621e06 Fix some illegal reflective access warnings
See gh-25531
2021-03-08 08:47:10 +01:00
Stephane Nicoll bb0f43cf07 Allow JMX endpoint ObjectNames to be customized
Closes gh-25317
2021-03-05 16:19:19 +01:00
Stephane Nicoll 36f8a7b9a6 Upgrade copyright year of changed files
See gh-25451
2021-02-27 11:23:07 +01:00
izeye c823f44e76 Polish
See gh-25451
2021-02-27 11:22:05 +01:00
Andy Wilkinson 54ba9e6ddf Merge branch '2.4.x'
Closes gh-25450
2021-02-26 14:30:47 +00:00
Andy Wilkinson cb600f1c0b Merge branch '2.3.x' into 2.4.x
Closes gh-25449
2021-02-26 14:26:57 +00:00
Andy Wilkinson 8f72ca6521 Use ResourceConfig customization to register endpoints with Jersey
Previously, actuator endpoints were registered with Jersey upon
injection of the ResourceConfig bean into a registrar class rather than
using a ResourceConfigCustomizer. This was done to fix a problem
when running the Actuator on a separate port where the main application
context's customizers were also applied to the management context,
breaking the singleton contract for those resources. This approach
meant that the registration could be performed at any point after the
ResourceConfig had been created. When Jersey's configured as a Filter
this resulted in the registration failing as the attempt was being made
after the Filter lifecyle callbacks which make the ResourceConfig
immutable.

This commit reworks the endpoint registration to be performed using a
ManagementContextResourceConfigCustomizer, a resource config customizer
that's only applied to the ResourceConfig that's used by the Actuator.
When there's a separate management context, this ResourceConfig is
created by the Actuator's auto-configuration and the management context
resource config customizers are applied to it during its creation. The
main application's customizers are not applied. When the actuator is
using the same context as the main application, this ResourceConfig is
created by the main application. In this case a
ResourceConfigCustomizer is defined that delegates to all
ManagementContextResourceConfigCustomizers, allowing them to register
the actuator endpoints with the main ResourceConfig.

Fixes gh-25262
2021-02-26 14:25:24 +00:00
Andy Wilkinson f09630f73c Allow additional keys to be configured for value sanitization
Closes gh-25384
2021-02-24 19:28:29 +00:00
Phillip Webb a1dc107144 Update copyright year of changed files 2021-02-18 16:23:56 -08:00
Andy Wilkinson da3f0dc1c7 Merge branch '2.4.x'
Closes gh-25186
2021-02-11 20:12:43 +00:00
Andy Wilkinson 9ba28a8b99 Merge branch '2.3.x' into 2.4.x
Closes gh-25185
2021-02-11 20:12:30 +00:00
Andy Wilkinson bd64e05203 Instrument AMQP AbstractCF when defined as a ConnectionFactory
Fixes gh-25138
2021-02-11 20:09:40 +00:00
Stephane Nicoll b92bb9332b Polish "Filter properties with a particular prefix"
See gh-24718
2021-02-10 17:32:18 +01:00
bono007 ad7c69a9cd Filter properties with a particular prefix
This commit improves the configprops endpoint to allow filtering
properties based on a particular prefix

See gh-24718
2021-02-10 15:30:02 +01:00
Madhura Bhave 301e80be8c Fix raw types error 2021-02-09 14:15:08 -08:00
Madhura Bhave c05cb21ab7 Add a property to disable the `/actuator` discovery page
Closes gh-24693
2021-02-09 11:36:29 -08:00
Stephane Nicoll b2818680fd Polish "Clarify usage of BufferingApplicationStartup"
See gh-25075
2021-02-09 09:44:19 +01:00
Andy Wilkinson db781a0d84 Merge branch '2.4.x'
See gh-25077
2021-02-02 15:14:18 +00:00
Andy Wilkinson 788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
2021-02-02 15:12:27 +00:00
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
2021-02-02 13:03:21 +00:00
Phillip Webb c9a2c4e326 Merge branch '2.4.x' 2021-01-26 19:06:48 -08:00
Andy Wilkinson 5a56f8864f Remove error message attribute instead of blanking it when not included
Closes gh-24712
2021-01-22 14:10:02 +00:00
Madhura Bhave d07e351eff Polish " Change info endpoint to be secure and unexposed by default"
See gh-24715
2021-01-21 15:13:53 -08:00
Hatef Palizgar 53c1e79810 Change info endpoint to be secure and unexposed by default
See gh-24715
2021-01-21 13:54:59 -08:00
Phillip Webb a196a9bd8f Merge branch '2.4.x'
Closes gh-24949
2021-01-20 13:49:37 -08:00
Phillip Webb 69fbd2f8aa Delegate `usesPathPatterns()` call to mappings
Update `CompositeHandlerMapping` so that the `usesPathPatterns()` method
returns `true` if any of the delegate mappings return `true`.

Closes gh-24877
2021-01-20 13:49:18 -08:00
Stephane Nicoll 012a199773 Remove Spring Data Solr support
In preparation to the upgrade to Spring Data 2021.0, this commit removes
auto-configuration for Spring Data Solr.

Closes gh-24939
2021-01-20 15:03:42 +01:00
Stephane Nicoll 3e376b955d Fix build failure
See gh-24943
2021-01-20 14:41:12 +01:00
Andy Wilkinson b095c7761a Polish "Add config prop for endpoints' CORS allowed origin patterns"
See gh-24680
2021-01-19 15:51:14 +00:00
Pedro Ivo Machado d7f891be39 Add config prop for endpoints' CORS allowed origin patterns
See gh-24680
2021-01-19 15:50:31 +00:00
Andy Wilkinson 4e918b141b Polish 2021-01-18 16:30:14 +00:00
Andy Wilkinson c6ce97b8a9 Disable all mappings endpoint infra when endpoint is unavailable
Previously, when the mappings endpoint was not available, the beans
that provide mapping descriptions were still created. This resulted
in unnecessary CPU and memory usage collecting and storing
information that would never by used.

This commit updates the auto-configuration for the mappings endpoint
so that all the beans that it creates are conditional on the endpoint
being available, rather than only the endpoint bean itself.

Closes gh-23977
2021-01-18 15:43:48 +00:00
Stephane Nicoll 2c2c160579 Remove deprecated code
See gh-24806
2021-01-15 14:14:33 +01:00
Stephane Nicoll a788ef4958 Merge branch '2.4.x'
Closes gh-24842
2021-01-14 18:03:38 +01:00
Stephane Nicoll 2072e7242a Merge branch '2.3.x' into 2.4.x
Closes gh-24841
2021-01-14 18:02:28 +01:00
Stephane Nicoll 283ed48d63 Unwrap Datasource against an actual interface
This commit updates DataSourceUnwrapper to take a separate interface
type argument if the target datasource has to be unwrapped, given that
the target type is usually not an interface.

Closes gh-24697
2021-01-14 18:00:35 +01:00
Phillip Webb 4cc1467aba Merge branch '2.4.x' 2021-01-12 12:04:40 -08:00
Phillip Webb a6a7c06e55 Merge branch '2.3.x' into 2.4.x 2021-01-12 12:04:11 -08:00
Phillip Webb 9da0bd8523 Update copyright year of changed files 2021-01-12 12:02:57 -08:00
Pascal Schumacher aa24f78d85 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
See gh-24734
2021-01-11 13:11:26 +01:00
Stephane Nicoll 632c1239e6 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
2021-01-11 09:12:53 +01:00
bono007 4b8d6efc12 Add support for GET requests for /actuator/startup
See gh-24717
2021-01-11 08:49:06 +01:00
Madhura Bhave b62325a056 Merge branch '2.4.x' 2021-01-04 13:37:05 -08:00
Madhura Bhave 86e94b95c3 Merge branch '2.3.x' into 2.4.x 2021-01-04 13:36:36 -08:00
Madhura Bhave 9928d74a9e Revert fix to enable cors for actuator endpoints
The fix causes a Jersey application to fail in the absence
of a `CorsFilter` or `CorsConfigurationSource` bean.

See gh-11987
2021-01-04 12:25:43 -08:00
Stephane Nicoll e4618cfb8d Delete ErrorProperties.IncludeStacktrace
Closes gh-21286
2020-12-24 10:35:04 +01:00