Commit Graph

745 Commits (b34b217d1e3c255dc85ff56fa74b28fdbf0ab45a)

Author SHA1 Message Date
Stephane Nicoll 430571b37b Perform binding at creation time if possible
Previously, environment binding always happened in a post processor once
the bean has been created. Constructor binding requires to perform the
binding at creating time so this commit performs binding at creation
time if possible.

When this happens, a special `ConfigurationPropertiesBeanDefinition` is
created with a supplier that invokes the binder. To avoid a case where
a bean is processed twice, the post-processor now ignores any bean that
has already been bound to the environment.

Closes gh-8762

Co-authored-by: Madhura Bhave <mbhave@pivotal.io>
6 years ago
Brian Clozel 8325fce53e Fix formatting 6 years ago
Brian Clozel 6586bae889 Guard Endpoint bean declarations with ConditionalOnExposedEndpoint
This commit adds the newly introduced `@ConditionalOnExposedEndpoint`
conditional annotation to all auto-configured `Endpoint` in Actuator.

With that change, `EndPoint` instances and related infrastructure will
only be created when they are meant to be exposed and used. This will
save CPU and memory resources when Actuator is present.

Closes gh-16093
6 years ago
Brian Clozel 4ffbe6c9e8 Add @ConditionalOnExposedEndpoint condition
Prior to this commit, Actuator `Endpoint` instantiations would be
guarded by `@ConditionalOnEnabledEnpoint` condition annotations. This
feature saves resources as disabled endpoints aren't unnecessarily
instantiated.

By default, only `"health"` and `"info"` endpoints are exposed over the
web and all endpoints are exposed over JMX.

As of gh-16090, JMX is now disabled by default. This is an opportunity
to avoid instantiating endpoints if they won't be exposed at all, which
is more likely due to the exposure defaults.

This commit adds a new `@ConditionalOnExposedEndpoint` conditional
annotation that checks the `Environment` for configuration properties
under `"management.endpoints.web.exposure.*"` and
`"management.endpoints.jmx.exposure.*"`. In the case of JMX, an
additional check is perfomed, checking that JMX is enabled first.
The rules implemented in the condition itself are following the ones
described in `ExposeExcludePropertyEndpointFilter`.

See gh-16093
6 years ago
Andy Wilkinson 0959698c32 Upgrade to Jersey 2.28
Closes gh-16114
6 years ago
Andy Wilkinson d6a869fa98 Switch to Jakarta EE API dependencies where possible
Closes gh-16113
Closes gh-16112
Closes gh-16111
Closes gh-15916
Closes gh-15689
6 years ago
Brian Clozel ce9626d00f Disable JMX by default
This commit switches the default value for the `spring.jmx.enabled`
configuration property.
JMX is now disabled by default and can be enabled with
`spring.jmx.enabled=true`.

Closes gh-16090
6 years ago
Stephane Nicoll 715db153e3 Polish "Remove code deprecated in 2.1"
Closes gh-16013
6 years ago
Stephane Nicoll 7b0004d6c3 Fix formatting 6 years ago
Andy Wilkinson f2e3e274a8 Merge branch '2.1.x' 6 years ago
Andy Wilkinson 53326695ea Polish 6 years ago
Madhura Bhave 6f045d8891 Merge branch '2.1.x' 6 years ago
Madhura Bhave c3e47541ad EndpointRequest should check that the request is to the mgmt context
Fixes gh-15702
6 years ago
Andy Wilkinson de0c065625 Inject single-use configuration dependencies into bean methods
Closes gh-15751
6 years ago
Andy Wilkinson e6764bdc5a Merge branch '2.1.x' 6 years ago
Andy Wilkinson 55426208ab Provide type information for optional thread dump endpoint response fields
Closes gh-15989
6 years ago
Madhura Bhave 862ffcbbf4 Merge branch '2.1.x' 6 years ago
Madhura Bhave bbe555a4f5 Split Jersey management context configuration
This commit splits the management context configuration for jersey
into two separate configurations depending on if the type is SAME or
CHILD. The configuration for the SAME context should only kick in if
there is no existing ResourceConfig bean.

Fixes gh-15891
6 years ago
Andy Wilkinson 22192c2b5c Polish "Make auto-config of RestTemplate metrics back off with no builder bean"
Closes gh-15842
6 years ago
Raheela 8f3c4dbc64 Make auto-config of RestTemplate metrics back off with no builder bean
See gh-15842
6 years ago
Madhura Bhave 4d69e127c8 Merge branch '2.1.x' 6 years ago
Madhura Bhave 26da45aa9a Configure a JerseyApplicationPath bean for the actuators
This commit also ensures that Jersey-based actuator endpoints are
available before the user has configured a `ResourceConfig` bean

Fixes gh-15625
Fixes gh-15877
6 years ago
Stephane Nicoll 380d7ec01c Merge branch '2.1.x' 6 years ago
Johnny Lim 885c28891b Polish
Closes gh-15873
6 years ago
Andy Wilkinson ecb7e240eb Merge branch '2.1.x' 6 years ago
Andy Wilkinson 59c66eaf41 Correct documented path for locked synchronizer's identity hashcode
Closes gh-15847
6 years ago
Andy Wilkinson ebcc53a9b7 Include tasks with custom triggers in scheduledtasks endpoint output
Closes gh-15815
6 years ago
Stephane Nicoll 002fa405a8 Merge branch '2.1.x' 6 years ago
Stephane Nicoll ede23caace Polish "Inject Map directly rather than via ObjectProvider"
Closes gh-15798
6 years ago
ayudovin 3a2e85ce75 Inject Map directly rather than via ObjectProvider
See gh-15798
6 years ago
Andy Wilkinson f23a0a5969 Inject InfoContributorProperties more precisely
Closes gh-15750
6 years ago
Stephane Nicoll 6baa6b291e Polish contribution
Closes gh-15695
6 years ago
Johnny Lim af3ed9ff9f Polish
See gh-15695
6 years ago
Phillip Webb 2f77ef7722 Merge branch '2.1.x' 6 years ago
Phillip Webb 9e58942698 Update copyright year for changed files 6 years ago
Phillip Webb 6a901199f5 Polish 6 years ago
Stephane Nicoll 5e736c0d1f Merge branch '2.1.x' 6 years ago
Stephane Nicoll 6ad01a6dfc Optimize ConditionalOnEnabledEndpoint usage
Closes gh-15451
6 years ago
Stephane Nicoll 2d2aa96c05 Allow ConditionalOnEnabledEndpoint to be set at class level
See gh-15451
6 years ago
Madhura Bhave 2dc7a89bd4 Merge branch '2.1.x' 6 years ago
Madhura Bhave 5b990605dc Polish "Order actuator security config after resource-server config"
Closes gh-15472
6 years ago
Stephen Doxsee 4597e7cc82 Order actuator security config after resource-server config
See gh-15472
6 years ago
Stephane Nicoll d57f831f50 Polish "Use Optional value in more functional style"
Closes gh-15575
6 years ago
igor-suhorukov 8ced867e95 Use Optional value in more functional style
See gh-15575
6 years ago
Stephane Nicoll fd12e696b0 Polish "Replace redundant call to class isInstance() with instanceof"
Closes gh-15554
6 years ago
igor-suhorukov 7424f48803 Replace redundant call to class isInstance() with instanceof
See gh-15554
6 years ago
Stephane Nicoll 9d67400afa Merge branch '2.1.x' 6 years ago
igor-suhorukov e578d30722 Replace anonymous inner class with lambda
See gh-15438
6 years ago
Andy Wilkinson 3a7406fe3a Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 0741c90489 Avoid blocking on a Mono indefinitely
Closes gh-15535
6 years ago