Commit Graph

20720 Commits

Author SHA1 Message Date
Andy Wilkinson
404f5d33f3 Align Gradle plugin's tests with Kotlin 1.3's restructuring
See gh-16195
2019-03-11 21:21:18 +00:00
Stephane Nicoll
fed145e195 Replace manual dependency management by Kotlin's bom
Closes gh-9486
2019-03-11 17:44:27 +01:00
Andy Wilkinson
aa2008bc5a Merge branch '2.1.x' 2019-03-11 16:40:19 +00:00
Andy Wilkinson
f0ef693376 Merge branch '2.0.x' into 2.1.x 2019-03-11 16:28:29 +00:00
Andy Wilkinson
c2eeeb032c Work around javac bug 2019-03-11 16:27:56 +00:00
Stephane Nicoll
09d51089ba Polish 2019-03-11 17:24:52 +01:00
Stephane Nicoll
fd0a11b7a7 Reuse Kotlin parameter names if possible
This commit detects a Kotlin constructor so that it is not required to
transmit the parameter names information to the Java side.

See gh-8762
2019-03-11 17:23:45 +01: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
Andy Wilkinson
821ee0cf83 Ensure that @Bean methods are only declared on @Configuration classes
Closes gh-16190
2019-03-11 15:01:59 +00:00
Stephane Nicoll
b34b217d1e Upgrade to Kotlin 1.3.21
Closes gh-16195
2019-03-11 15:56:13 +01:00
Stephane Nicoll
341859b5fe Start building against Spring Framework 5.2 snapshots
See gh-16173
2019-03-11 15:22:14 +01:00
Stephane Nicoll
c30f9815c1 Fix detection of Autowired constructor with Kotlin
Previously, the import selector wrongly assumed that we should not
use constructor injection with Kotlin. Rather than looking up for the
primary constructor, we retrieve available constructors on the Java
counter-part.

This commit applies the same logic as in the constructor parameter
binder and checks for the primary constructor for Kotlin types.

See gh-8762
2019-03-11 10:19:25 +01:00
Andy Wilkinson
7675802338 Merge branch '2.1.x' 2019-03-11 08:32:03 +00:00
Andy Wilkinson
f574213cc8 Mark log file endpoint as producing text/plain
Closes gh-16188
2019-03-11 08:30:31 +00:00
Andy Wilkinson
7d0317419d Polish 2019-03-10 12:42:09 +00:00
Andy Wilkinson
89bb973745 Merge branch '2.1.x' 2019-03-09 20:02:05 +00:00
Andy Wilkinson
7153525ee2 Annotation @JsonTest with @ExtendWith(SpringExtension.class)
Closes gh-16183
2019-03-09 20:00:06 +00:00
Stephane Nicoll
d07a6ff0bb Fix binding of bean with no bean definition
See gh-16180
2019-03-09 20:49:47 +01:00
Andy Wilkinson
f5eb853f26 Update web starter to depend on validator starter
Previously, the web starter declared direct dependencies on Hibernate Validator
and the Jakarta EE validation API. This meant that it required two exclusions to
exclude validation from a web application that did not need it.

This commit updates the web starter to get its validation dependencies via a
dependency on the validation starter. This allows validation to be excluded
using a single exclusion. The EL dependency from the validation starter has
been excluded to allow the EL implementation from the underlying container
starter (Tomcat, Jetty, or Undertow) to continue to be used instead.

Closes gh-16176
2019-03-08 17:54:03 +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
Madhura Bhave
7ca589d43c Add constructor based binding support
See gh-8762

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-03-08 15:50:44 +01:00
Stephane Nicoll
8948c1dac6 Revert 80f4113
See gh-15809
2019-03-08 14:39:09 +01:00
Andy Wilkinson
2bd3d19bee Ensure that DevTools' beans use eager init even when app is lazy
Closes gh-15870
2019-03-08 10:05:40 +00:00
Andy Wilkinson
1431a0f585 Upgrade to Spring Data Moore-M2
Closes gh-15197
2019-03-08 08:21:06 +00:00
Andy Wilkinson
143d68b208 Merge branch '2.1.x' 2019-03-08 08:20:38 +00:00
Andy Wilkinson
eeaf057f47 Merge branch '2.0.x' into 2.1.x 2019-03-08 08:20:24 +00:00
Andy Wilkinson
fd8a2691a5 Upgrade Maven Wrapper and drop back to Maven 3.5.4
See gh-16167
2019-03-08 08:19:42 +00: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
b8dff5fe17 Merge branch '2.1.x' 2019-03-07 10:20:29 +00:00
Andy Wilkinson
9d06d22b99 Merge branch '2.0.x' into 2.1.x 2019-03-07 10:17:01 +00:00
Andy Wilkinson
affdbeef41 Polish 2019-03-07 10:08:39 +00:00
Andy Wilkinson
e1a7f1e085 Upgrade to Cassandra Driver 3.7.1
Closes gh-16163
2019-03-07 09:44:30 +00:00
Andy Wilkinson
c4756e9057 Merge branch '2.1.x' 2019-03-07 09:43:16 +00:00
Andy Wilkinson
f46894dfd3 Merge branch '2.0.x' into 2.1.x 2019-03-07 09:43:02 +00:00
Andy Wilkinson
17a1b2822c Isolate LoggerContext state to each test
Closes gh-16162
2019-03-07 09:37:41 +00:00
Andy Wilkinson
3f3966adb0 Merge branch '2.1.x' 2019-03-07 09:25:45 +00:00
Andy Wilkinson
9963ed1249 Merge branch '2.0.x' into 2.1.x 2019-03-07 09:25:31 +00:00
Andy Wilkinson
83216c34e5 Merge branch '1.5.x' into 2.0.x 2019-03-07 09:25:17 +00:00
Andy Wilkinson
3fdf2818b3 Remove reliance on side-effects in LogbackLoggingSystemTests
Closes gh-16160
2019-03-07 09:22:42 +00:00
Andy Wilkinson
7c58d72734 Upgrade to Mongo Driver Reactivestreams 1.11.0
Closes gh-16159
2019-03-06 19:51:03 +00:00
Andy Wilkinson
36cbd00853 Disable AssertJ's bare-named property accessor discovery
AssertJ includes a change in 3.12 that means that, by default, it now incorrectly
identifies some of the builder methods on CacheControl as accessor methods for its fields.
This commit restores the behaviour of 3.11 so that a method is only considered to be a
property accessor if a matches the Java bean naming conventions.

Closes gh-16145
2019-03-06 19:42:38 +00:00
Andy Wilkinson
e667911f91 Merge branch '2.1.x' 2019-03-06 15:11:28 +00:00
Andy Wilkinson
80f2e2260e Merge branch '2.0.x' into 2.1.x 2019-03-06 15:11:09 +00:00
Andy Wilkinson
e56580ddc6 Merge branch '1.5.x' into 2.0.x 2019-03-06 15:10:25 +00:00
Andy Wilkinson
2916421188 Revert "Upgrade to Jetty 9.4.15.v20190215"
This reverts commit 53e7c5cde1.

See gh-16118
2019-03-06 15:09:21 +00:00
Andy Wilkinson
87d696d697 Align with breaking API change in AssertJ 3.12
Closes gh-16145
2019-03-06 14:38:17 +00:00
Andy Wilkinson
c2e9f98655 Upgrade to Spring Plugin 2.0.0.M1
Closes gh-15940
2019-03-06 13:40:34 +00:00