Commit Graph

868 Commits (dc4cc214fe29d6a5b1b2564ffd8dc41f96ee4aad)

Author SHA1 Message Date
Stephane Nicoll 4d8df3cc47 Polish "Allow configuration of auto-timed metrics"
This commit makes sure the "auto-time-requests" property is still
available in a deprecated fashion.

See gh-15988
6 years ago
Madhura Bhave 1db1c8b03c Validate our own tests work with JUnit5 and the vintage engine
Closes gh-14737

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
6 years ago
Madhura Bhave 07d6eb6397 Disable auditing infrastructure by default
Prior to this commit, the audit auto-configuration provided
an `InMemoryAuditEventRepository` bean. This commit changes the auto-config
so that an `AuditEventRepository` is not provided and instead the auto-config
is conditional on the presence of a `AuditEventRepository` bean. This is done
to encourage the use of a custom implementation of `AuditEventRepository`
since the in-memory one is quite limited and not suitable for production.
A flag is available if the auto-configuration needs to be turned off even
in the presence of a bean.

Closes gh-16110
6 years ago
Madhura Bhave e2b15c3f2a Fix tests
See gh-15039
6 years ago
Madhura Bhave de128fed20 Disable HttpTrace infrastructure by default
Prior to this commit, the http trace auto-configuration provided
an `InMemoryHttpTraceRepository` bean. This commit changes the auto-config
so that an `HttpTraceRepository` is not provided and instead the auto-config
is conditional on the presence of a `HttpTraceRepository` bean. This is done
to encourage the use of a custom implementation of `HttpTraceRepository`
since the in-memory one is quite limited and not suitable for production.
A flag is available if the auto-configuration needs to be turned off even
in the presence of a bean.

Closes gh-15039
6 years ago
Madhura Bhave cc99b13ecb Merge branch '2.1.x' 6 years ago
Madhura Bhave c9752f165f Fix javadoc 6 years ago
Stephane Nicoll 8045bf1f50 Polish "Allow configuration of auto-timed metrics"
Closes gh-15988
6 years ago
Tadaya Tsuyukubo 4df6f5dee0 Allow configuration of auto-timed metrics
When `management.metrics.web.server.auto-time-requests` is enabled
(default=true), Spring Boot collects metrics on controller methods even
when they are not annotated with `@Timed`.

When this happens, created metrics are based on the default
`@Timed` configuration and there is no way to customize the
configuration of those auto-timed controller metrics.

This commit adds default configurations to auto-timed requests on both
client and server sides.

See gh-15988
6 years ago
Phillip Webb 17aaf26590 Use consistent javadoc style for annotation links
Closes gh-13920
6 years ago
Phillip Webb 1e44aba772 Fix compiler warnings and polish
Fix various compiler warnings and apply a little polish.
6 years ago
Andy Wilkinson 4754386361 Merge branch '2.1.x'
Closes gh-16644
6 years ago
Andy Wilkinson 6b20d13b3d Polish "Prevent double update of metrics when CompositeMeterRegistry exists"
See gh-16221
6 years ago
Johnny Lim cc285d92dd Prevent double update of metrics when CompositeMeterRegistry exists
See gh-16221
6 years ago
Phillip Webb b879972d0d Migrate to MergedAnnotations API
Migrate away from `AnnotationUtils` and `AnnotatedElementUtils`
when possible to the new `MergedAnnotations` API.

Closes gh-16551
6 years ago
Phillip Webb 2dfd916c96 Polish 6 years ago
Vedran Pavic bbaa98175f Upgrade to Hazelcast 3.12
Closes gh-16503
6 years ago
Stephane Nicoll f42b6199ae Polish 6 years ago
Stephane Nicoll a828072132 Migrate tests to use withBean
See gh-16011
6 years ago
Stephane Nicoll 84735f58f3 Fix build failure 6 years ago
Madhura Bhave ce0282406f Skip lazy init for beans that explicitly set lazy to false
This commit also adds tests to ensure that the child
management context works when lazy initialization is
enabled. Also, it adds a BeanFactoryPostProcessor to
the child context so that the server is created and
listening for requests but other beans in the child
context are not created until requested.

See gh-16184
6 years ago
Andy Wilkinson ff1e5076dc Merge branch '2.1.x'
Closes gh-16473
6 years ago
Andy Wilkinson c0a91478f1 Only start management server once main server is initialized
Closes gh-15378
6 years ago
Stephane Nicoll c432288ed1 Migrate ApplicationContext to common hierarchy
This commit migrates `AnnotationConfigReactiveWebApplicationContext`
parent to the `GenericApplicationContext` abstraction. Any use of
`AnnotationConfigWebApplicationContext` is also removed as it also
inherits from the `AbstractRefreshableApplicationContext` outdated
hierarchy.

A new `AnnotationConfigServletWebApplicationContext` context is
introduced instead, extending from `GenericApplicationContext` and
providing the counter part of the reactive context for the Servlet-based
web app tests.

See gh-16096
6 years ago
Phillip Webb ad7eebee9e Merge branch '2.1.x' 6 years ago
Phillip Webb f12ab1ff90 Update copyright header of changed files 6 years ago
Phillip Webb 34fee1adfa Polish 6 years ago
Andy Wilkinson c5c53849ce Merge branch '2.1.x' 6 years ago
Andy Wilkinson ca0119950f Align with new fail-fast behaviour in Micrometer 1.1.4
Closes gh-16425
6 years ago
Phillip Webb 2376f973f4 Merge branch '2.1.x' 6 years ago
Phillip Webb 47c6bf741d Merge branch '2.0.x' into 2.1.x 6 years ago
Phillip Webb 07c000c5b7 Merge branch '1.5.x' into 2.0.x 6 years ago
Stephane Nicoll 8c8a088c20 Fix zip structure of Actuator documentation
Closes gh-16326
6 years ago
Andy Wilkinson e1a6726d76 Polish "Update CORS handling according to Framework changes"
See gh-16410
6 years ago
Sebastien Deleuze 2f9db7eec6 Update CORS handling according to Framework changes
This commit updates CORS handling according to Framework changes
introduced via [1]. It also fixes tests according to the new behavior.

See gh-16410

[1] d27b5d0ab6.
6 years ago
Stephane Nicoll f4c4b1d3f0 Polish "Permit use of https for configuring Prometheus push gateway"
Closes gh-16084
6 years ago
Dmytro Nosan eed4e9ea56 Permit use of https for configuring Prometheus push gateway
See gh-16084
6 years ago
Stephane Nicoll 1bc47b7e74 Polish "Add Spring-specific styling to Actuator's API documentation"
Closes gh-16326
6 years ago
simionAndrei 26cfbe04b2 Add Spring-specific styling to Actuator's API documentation
This commit replaces the default Asciidoctor styling with
Spring specific styling.

First, we need to unzip the contents of the Spring Asciidoctor
documentation resources provided by the
`io.spring.docsresources:spring-docs-resources` distribution zip. This
is done in a `/target/refdocs` folder. We then copy all files from
`src/main/asciidoc` to the same location, and then launch the generation
process.

See gh-16326
6 years ago
Spring Operator fb242c27d2 Use HTTPS for external links wherever possible
See gh-16276
6 years ago
Andy Wilkinson 878a635bfb Merge branch '2.1.x' 6 years ago
Spring Operator 9fc3ac7d49 Use HTTPS for external links wherever possible
See gh-16320
6 years ago
Andy Wilkinson 864942ad4f Merge branch '2.0.x' into 2.1.x 6 years ago
Spring Operator 1a4c6f2dac Use HTTPS for external links wherever possible
See gh-16319
6 years ago
Andy Wilkinson ba4671f0ab Merge branch '1.5.x' into 2.0.x 6 years ago
Stephane Nicoll b055410ab4 Fix outdated tests
Closes gh-16298
6 years ago
Valery_Yalauchuk c880e10c41 Fix LogFile conditions to check for exposure as well
Closes gh-16298
6 years ago
Stephane Nicoll 76ca467d92 Merge branch '2.1.x' 6 years ago
Stephane Nicoll bd2cc6f48b Add missing condition on LogFile endpoint
See gh-16298
6 years ago
Andy Wilkinson 36c1c051b8 Merge branch '2.1.x' 6 years ago
Andy Wilkinson e23f72c8b0 Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 6 years ago
Andy Wilkinson b828b398b5 Merge branch '2.1.x' 6 years ago
Andy Wilkinson a36aa67b52 Merge branch '2.0.x' into 2.1.x 6 years ago
Spring Operator 3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
6 years ago
Madhura Bhave 3d0219c315 Merge branch '2.1.x' 6 years ago
Johnny Lim c5b5f752ed Polish
Closes gh-16219
6 years ago
Stephane Nicoll c115ee1550 Fix build failure 6 years ago
Stephane Nicoll 0e0ea7f00a Fix checkstyle violation 6 years ago
Stephane Nicoll fcdc414646 Remove use of `@Autowired` for configuration properties bean
See gh-8762
6 years ago
Madhura Bhave 223f2be7d2 Inject InfoContributors instead of exposing them on InfoEndpoint
Closes gh-13586
6 years ago
Stephane Nicoll 81def1f21d Polish 6 years ago
Madhura Bhave e8cb75bba8 Enable git remote linking automatically on CF
Closes gh-13586
6 years ago
Andy Wilkinson 68bfb020aa Reduce need for bean method proxying and disable where not needed
Closes gh-9068
6 years ago
Andy Wilkinson 4b98fa7d94 Alias proxyBeanMethods on annotations meta-annotated with @Configuration
Closes gh-16201
6 years ago
Phillip Webb 64a2e8d67f Update copyright year for changed files 6 years ago
Phillip Webb dd3e8154d9 Merge branch '2.1.x' 6 years ago
Phillip Webb fc3aa43cc2 Update copyright year for changed files 6 years ago
Phillip Webb f02887b6c6 Merge branch '2.0.x' into 2.1.x 6 years ago
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.
6 years ago
Andy Wilkinson aa2008bc5a Merge branch '2.1.x' 6 years ago
Andy Wilkinson 8c3cec8f13 Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 361437f4e2 Merge branch '1.5.x' into 2.0.x 6 years ago
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