756 Commits

Author SHA1 Message Date
Madhura Bhave
e8cb75bba8 Enable git remote linking automatically on CF
Closes gh-13586
2019-03-12 17:30:00 -07:00
Andy Wilkinson
68bfb020aa Reduce need for bean method proxying and disable where not needed
Closes gh-9068
2019-03-12 13:18:42 +00:00
Andy Wilkinson
4b98fa7d94 Alias proxyBeanMethods on annotations meta-annotated with @Configuration
Closes gh-16201
2019-03-12 09:24:20 +00:00
Phillip Webb
64a2e8d67f Update copyright year for changed files 2019-03-11 22:15:36 -07:00
Phillip Webb
dd3e8154d9 Merge branch '2.1.x' 2019-03-11 22:15:19 -07:00
Phillip Webb
fc3aa43cc2 Update copyright year for changed files 2019-03-11 22:14:53 -07:00
Phillip Webb
f02887b6c6 Merge branch '2.0.x' into 2.1.x 2019-03-11 22:14:21 -07:00
Phillip Webb
9c3af103e0 Fix ScheduledTasksEndpointAutoConfigurationTests
Update the `CustomEndpointConfiguration` class in
`ScheduledTasksEndpointAutoConfigurationTests` to be package private
so that it can be enhanced by cglib.

Prior to merge commit 361437f4 the class was a lite configuration so
it didn't matter that it was a private class.
2019-03-11 22:12:36 -07:00
Andy Wilkinson
aa2008bc5a Merge branch '2.1.x' 2019-03-11 16:40:19 +00:00
Andy Wilkinson
8c3cec8f13 Merge branch '2.0.x' into 2.1.x 2019-03-11 16:14:19 +00:00
Andy Wilkinson
361437f4e2 Merge branch '1.5.x' into 2.0.x 2019-03-11 15:53:34 +00:00
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>
2019-03-08 15:50:44 +01:00
Brian Clozel
8325fce53e Fix formatting 2019-03-07 21:02:41 +01:00
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
2019-03-07 20:13:44 +01:00
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
2019-03-07 20:05:23 +01:00
Andy Wilkinson
0959698c32 Upgrade to Jersey 2.28
Closes gh-16114
2019-03-06 12:58:35 +00:00
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
2019-03-06 11:20:51 +00:00
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
2019-03-05 18:51:00 +01:00
Stephane Nicoll
715db153e3 Polish "Remove code deprecated in 2.1"
Closes gh-16013
2019-02-27 11:15:48 +01:00
Stephane Nicoll
7b0004d6c3 Fix formatting 2019-02-21 14:17:34 +01:00
Andy Wilkinson
f2e3e274a8 Merge branch '2.1.x' 2019-02-21 08:19:43 +00:00
Andy Wilkinson
53326695ea Polish 2019-02-21 08:13:54 +00:00
Madhura Bhave
6f045d8891 Merge branch '2.1.x' 2019-02-20 16:13:20 -08:00
Madhura Bhave
c3e47541ad EndpointRequest should check that the request is to the mgmt context
Fixes gh-15702
2019-02-20 16:08:26 -08:00
Andy Wilkinson
de0c065625 Inject single-use configuration dependencies into bean methods
Closes gh-15751
2019-02-20 17:02:43 +00:00
Andy Wilkinson
e6764bdc5a Merge branch '2.1.x' 2019-02-19 09:39:38 +00:00
Andy Wilkinson
55426208ab Provide type information for optional thread dump endpoint response fields
Closes gh-15989
2019-02-19 09:12:54 +00:00
Madhura Bhave
862ffcbbf4 Merge branch '2.1.x' 2019-02-13 13:33:14 -08:00
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
2019-02-13 13:27:54 -08:00
Andy Wilkinson
22192c2b5c Polish "Make auto-config of RestTemplate metrics back off with no builder bean"
Closes gh-15842
2019-02-12 14:35:38 +00:00
Raheela
8f3c4dbc64 Make auto-config of RestTemplate metrics back off with no builder bean
See gh-15842
2019-02-12 14:28:48 +00:00
Madhura Bhave
4d69e127c8 Merge branch '2.1.x' 2019-02-08 18:38:21 -08:00
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
2019-02-08 18:38:01 -08:00
Stephane Nicoll
380d7ec01c Merge branch '2.1.x' 2019-02-08 09:21:06 +01:00
Johnny Lim
885c28891b Polish
Closes gh-15873
2019-02-08 09:20:15 +01:00
Andy Wilkinson
ecb7e240eb Merge branch '2.1.x' 2019-02-05 12:33:19 +00:00
Andy Wilkinson
59c66eaf41 Correct documented path for locked synchronizer's identity hashcode
Closes gh-15847
2019-02-05 12:30:46 +00:00
Andy Wilkinson
ebcc53a9b7 Include tasks with custom triggers in scheduledtasks endpoint output
Closes gh-15815
2019-02-05 12:12:07 +00:00
Stephane Nicoll
002fa405a8 Merge branch '2.1.x' 2019-01-31 16:26:37 +01:00
Stephane Nicoll
ede23caace Polish "Inject Map directly rather than via ObjectProvider"
Closes gh-15798
2019-01-31 16:25:18 +01:00
ayudovin
3a2e85ce75 Inject Map directly rather than via ObjectProvider
See gh-15798
2019-01-31 16:24:18 +01:00
Andy Wilkinson
f23a0a5969 Inject InfoContributorProperties more precisely
Closes gh-15750
2019-01-21 16:56:39 +00:00
Stephane Nicoll
6baa6b291e Polish contribution
Closes gh-15695
2019-01-14 08:11:20 -05:00
Johnny Lim
af3ed9ff9f Polish
See gh-15695
2019-01-14 08:09:32 -05:00
Phillip Webb
2f77ef7722 Merge branch '2.1.x' 2019-01-11 16:45:05 -08:00
Phillip Webb
9e58942698 Update copyright year for changed files 2019-01-11 16:42:02 -08:00
Phillip Webb
6a901199f5 Polish 2019-01-11 16:42:02 -08:00
Stephane Nicoll
5e736c0d1f Merge branch '2.1.x' 2019-01-07 13:46:23 +01:00
Stephane Nicoll
6ad01a6dfc Optimize ConditionalOnEnabledEndpoint usage
Closes gh-15451
2019-01-07 13:45:53 +01:00
Stephane Nicoll
2d2aa96c05 Allow ConditionalOnEnabledEndpoint to be set at class level
See gh-15451
2019-01-07 13:45:35 +01:00