831 Commits

Author SHA1 Message Date
Andy Wilkinson
0644a79401 Repackage output capture and always use extension declaratively
Closes gh-17029
2019-05-31 18:33:10 +01:00
Phillip Webb
d11d5ceb29 Split up JUnit 5 OutputCapture class
Split the JUnit 5 `OutputCapture` class into separate `OutputExtension`
and `CapturedOutput` classes. The JUnit 5 callback methods are now
contained only in the `OutputExtension` class so no longer pollute the
public API that users will interact with.

The `CapturedOutput` class has also been updated to capture System.err
and System.out separately to allow distinct assertions if required.

Closes gh-17029
2019-05-30 23:44:35 -07:00
Phillip Webb
68a3fbd7a0 Extract AutoTimer interface for metrics
Refactor `Autotime` from a properties object to an interface and
change the existing metric recording implementations. The `AutoTimer`
interface is a general purpose callback that can be applied to a
`Timer.Builder` to configure it. Autotime properties are now located
in `spring-boot-actuator-autoconfigure` and have become an
implementation of the interface.

Closes gh-17026
2019-05-30 16:03:34 -07:00
Phillip Webb
68aec8b6ee Polish 2019-05-30 11:30:27 -07:00
Andy Wilkinson
b603cd5d4b Disable Tomcat's MBean Registry by default
Closes gh-16498
2019-05-28 15:21:31 +01:00
Andy Wilkinson
080a2f5c3b Align with Framework’s removal of charset attribute from application/json
Closes gh-16979
2019-05-28 10:58:23 +01:00
Andy Wilkinson
23f803c6b6 Upgrade to Hamcrest 2.1, switch to hamcrest artifact from -core and -library
Closes gh-15555
2019-05-22 14:50:15 +01:00
dreis2211
27ca7e17d9 Fix deprecated StandardAnnotationMetadata usages
Closes gh-16930
2019-05-22 14:05:15 +02:00
Stephane Nicoll
26df55761d Merge enablement and exposure conditions for Actuator endpoints
This commit merges the conditions for determining if an endpoint is
available in a single condition, deprecating
`ConditionalOnEnabledEndpoint` in the process.

Closes gh-16169
2019-05-20 13:52:59 +02:00
Johnny Lim
4900117c71 Restore HttpTraceAutoConfigurationTests.configuresServletFilter()
Closes gh-16885
2019-05-20 08:47:30 +02:00
Phillip Webb
3a9ca5fa30 Update copyright header of changed files 2019-05-14 21:05:53 -07:00
Phillip Webb
79e05c770f Merge branch '2.1.x' 2019-05-14 21:05:05 -07:00
Phillip Webb
ed998ef0d3 Update copyright header of changed files 2019-05-14 21:04:50 -07:00
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
2019-05-14 11:20:59 +02:00
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>
2019-05-08 16:05:44 +02:00
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
2019-05-03 13:48:29 -07:00
Madhura Bhave
e2b15c3f2a Fix tests
See gh-15039
2019-05-03 12:32:06 -07:00
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
2019-05-03 12:00:37 -07:00
Madhura Bhave
cc99b13ecb Merge branch '2.1.x' 2019-05-01 10:26:31 -07:00
Madhura Bhave
c9752f165f Fix javadoc 2019-05-01 10:23:52 -07:00
Stephane Nicoll
8045bf1f50 Polish "Allow configuration of auto-timed metrics"
Closes gh-15988
2019-05-01 08:17:06 +02:00
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
2019-05-01 08:16:42 +02:00
Phillip Webb
17aaf26590 Use consistent javadoc style for annotation links
Closes gh-13920
2019-04-24 19:37:59 -07:00
Phillip Webb
1e44aba772 Fix compiler warnings and polish
Fix various compiler warnings and apply a little polish.
2019-04-24 19:37:42 -07:00
Andy Wilkinson
4754386361 Merge branch '2.1.x'
Closes gh-16644
2019-04-24 15:09:41 +01:00
Andy Wilkinson
6b20d13b3d Polish "Prevent double update of metrics when CompositeMeterRegistry exists"
See gh-16221
2019-04-24 15:02:58 +01:00
Johnny Lim
cc285d92dd Prevent double update of metrics when CompositeMeterRegistry exists
See gh-16221
2019-04-24 14:54:30 +01:00
Phillip Webb
b879972d0d Migrate to MergedAnnotations API
Migrate away from `AnnotationUtils` and `AnnotatedElementUtils`
when possible to the new `MergedAnnotations` API.

Closes gh-16551
2019-04-18 15:40:02 -07:00
Phillip Webb
2dfd916c96 Polish 2019-04-15 17:51:08 -07:00
Vedran Pavic
bbaa98175f Upgrade to Hazelcast 3.12
Closes gh-16503
2019-04-11 12:38:47 +02:00
Stephane Nicoll
f42b6199ae Polish 2019-04-09 12:21:28 +02:00
Stephane Nicoll
a828072132 Migrate tests to use withBean
See gh-16011
2019-04-09 12:15:05 +02:00
Stephane Nicoll
84735f58f3 Fix build failure 2019-04-06 18:00:13 +02:00
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
2019-04-05 18:02:26 -07:00
Andy Wilkinson
ff1e5076dc Merge branch '2.1.x'
Closes gh-16473
2019-04-05 17:37:24 +01:00
Andy Wilkinson
c0a91478f1 Only start management server once main server is initialized
Closes gh-15378
2019-04-05 17:36:20 +01:00
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
2019-04-05 14:17:41 +02:00
Phillip Webb
ad7eebee9e Merge branch '2.1.x' 2019-04-03 17:00:25 -07:00
Phillip Webb
f12ab1ff90 Update copyright header of changed files 2019-04-03 16:13:00 -07:00
Phillip Webb
34fee1adfa Polish 2019-04-03 16:12:37 -07:00
Andy Wilkinson
c5c53849ce Merge branch '2.1.x' 2019-04-03 14:41:15 +01:00
Andy Wilkinson
ca0119950f Align with new fail-fast behaviour in Micrometer 1.1.4
Closes gh-16425
2019-04-03 14:39:29 +01:00
Phillip Webb
2376f973f4 Merge branch '2.1.x' 2019-04-02 13:46:36 -07:00
Phillip Webb
47c6bf741d Merge branch '2.0.x' into 2.1.x 2019-04-02 13:40:21 -07:00
Phillip Webb
07c000c5b7 Merge branch '1.5.x' into 2.0.x 2019-04-02 13:34:28 -07:00
Stephane Nicoll
8c8a088c20 Fix zip structure of Actuator documentation
Closes gh-16326
2019-04-02 16:38:11 +02:00
Andy Wilkinson
e1a6726d76 Polish "Update CORS handling according to Framework changes"
See gh-16410
2019-04-02 12:48:00 +01:00
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.
2019-04-02 12:47:07 +01:00
Stephane Nicoll
f4c4b1d3f0 Polish "Permit use of https for configuring Prometheus push gateway"
Closes gh-16084
2019-03-29 17:03:28 +01:00
Dmytro Nosan
eed4e9ea56 Permit use of https for configuring Prometheus push gateway
See gh-16084
2019-03-29 16:48:27 +01:00