1484 Commits

Author SHA1 Message Date
Phillip Webb
69fbd8f20c Merge branch '2.1.x'
Closes gh-17227
Closes gh-17228
2019-06-17 11:53:16 -07:00
Phillip Webb
692bda1595 Polish "Fix connection timeout configuration for Netty"
See gh-16535
2019-06-17 11:26:36 -07:00
ayudovin
b0e4c716d3 Fix connection timeout configuration for Netty
Update `NettyWebServerFactoryCustomizer` to deal with the fact that
Netty treats `0` and negative connection timeout values differently to
Tomcat, Undertow and Jetty.

See gh-16535
2019-06-17 11:24:35 -07:00
Andy Wilkinson
9d355f00e1 Merge branch '2.1.x'
Closes gh-17218
2019-06-17 13:19:45 +01:00
Andy Wilkinson
5dc2339ec2 Polish "Consider properties from @AutoConfigureTestDatabase"
See gh-16814
2019-06-17 11:38:13 +01:00
András Deák
92256c80d0 Consider properties from @AutoConfigureTestDatabase
Both Flyway and Liquibase makes use of DataSourceProperties to get
default properties. Previously, both used strictly the configuration
properties and failed to consider embedded datasource properties
autoconfigured by @AutoConfigureTestDatabase. In case a database layer
test e.g. @JdbcTest relies on the autoconfigured embedded datasource,
Flyway and Liquibase autoconfiguration fails as they are not aware of
the embedded datasource properties.

See gh-16814
2019-06-17 11:09:29 +01:00
Madhura Bhave
c6dae5764e Add bindOrCreate for constructor based binding
Deprecate the existing `BindResult.orElseCreate` method in favor of
`bindOrCreate` methods on the `Binder`. These new methods allow us to
implement custom creation logic depending on the type of object being
bound. Specifically, it allows constructor based binding to create new
instances that respect the `@DefaultValue` annotations.

Closes gh-17098

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
2019-06-14 18:14:40 -07:00
Andy Wilkinson
48adfe626c Log H2 console path and JDBC URL on startup
Closes gh-17063
2019-06-14 13:42:01 +01:00
Madhura Bhave
0d2e44151b Fix tests following Spring Security changes 2019-06-13 16:09:57 -07:00
Phillip Webb
9db20313a1 Polish "Add Printer and Parser beans to conversion service"
Extract common registration code and make use of the Spring Framework
registration methods.

See gh-17064
2019-06-13 08:54:11 -07:00
Dmytro Nosan
955eaa87ae Add Printer and Parser beans to conversion service
Update `WebMvcAutoConfiguration` and `WebFluxAutoConfiguration` so that
`Printer<T>` and `Parser<T>` beans are automatically registered with
the conversion service.

Prior to this commit only `GenericConverter`, `Converter` and
`Formatter` beans were automatically registered.

See gh-17064
2019-06-13 08:54:11 -07:00
Stephane Nicoll
54c72cf39f Polish 2019-06-13 15:24:04 +02:00
Stephane Nicoll
985c8f7598 Polish RSocket support 2019-06-13 15:11:00 +02:00
Andy Wilkinson
704b5fb2ee Enable encoding of message/x.rsocket.routing.v0 requests
Closes gh-17135
2019-06-13 12:38:15 +01:00
Phillip Webb
e0aa90cf32 Fix incomplete polish of RedisSessionProperties
Fix polish commit from 919913ae66 to correctly name the property
getter/setters.

See gh-17022
2019-06-12 17:43:11 -07:00
Phillip Webb
919913ae66 Polish "Add session property for ConfigureRedisAction"
See gh-17022
2019-06-12 17:33:45 -07:00
Dmytro Nosan
a0fabc9851 Add session property for ConfigureRedisAction
Add a new property to `RedisSessionProperties` that allows the default
`ConfigureRedisAction` to be changed. Users can still also configure
the action using a `@Bean`.

See gh-17022
2019-06-12 17:31:39 -07:00
Phillip Webb
aad21d1996 Polish "Support default headers with RestTemplateBuilder"
Broaden the scope of customizer support so that instead of focusing
just on headers, we can now customize any outgoing `HttpClientRequest`.
Also update auto-configuration to automatically add any
`RestTemplateRequestCustomizer` beans to the builder.

See gh-17091
2019-06-12 16:34:31 -07:00
Andy Wilkinson
9b5cb4f9b8 Remove need for public constructor on inner-class
Closes gh-17086
2019-06-12 14:55:40 +01:00
Brian Clozel
7a9d1a1e34 Change default Freemarker template file extension
This commit changes the default file extension for Freemarker templates
from `*.ftl` to `*.ftlh`. This commit also enables by default the
Freemarker setting `"recognize_standard_file_extensions"` to ensure that
HTML escaping is performed by default in Spring Boot applications.

Applications should adapt to this change by changing the file extensions
of existing templates to `.ftlh`.

Closes gh-15131
2019-06-12 15:52:04 +02:00
Phillip Webb
b3d5cd538d Add JUnit 5 checkstyle rules
Add a rule to enforce JUnit 5 usage and conventions.

Closes gh-17093
2019-06-10 16:16:45 -07:00
Madhura Bhave
2560b54f7c Add configuration support for Opaque Token authentication
Closes gh-15872
2019-06-10 14:24:32 -07:00
Andy Wilkinson
75e45fd239 Switch to @DisableWithoutTestcontainers
Closes gh-17092
2019-06-10 12:49:12 +01:00
Phillip Webb
266d6334b2 Fix checkstyle RedundantModifier test violations 2019-06-07 20:46:33 -07:00
Phillip Webb
cde4f0d688 Fix checkstyle violations 2019-06-07 13:27:14 -07:00
Andy Wilkinson
b18fffaf14 Move tests to JUnit 5 wherever possible 2019-06-07 12:25:54 +01:00
Andy Wilkinson
aef92b9295 Merge branch '2.1.x'
Closes gh-17079
2019-06-07 11:00:44 +01:00
Andy Wilkinson
24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
2019-06-07 10:50:34 +01:00
Andy Wilkinson
c6c139d980 Merge branch '1.5.x' into 2.0.x 2019-06-07 10:46:31 +01:00
Brian Clozel
5b2de5c81d Configure PathPattern for RSocket routing
This commit configures a `PathPatternRouteMatcher` in the RSocket
support if spring-web is on the classpath. This `RouteMatcher`
implementation is more efficient than the `SimpleRouteMatcher`, which is
based on the `AntPathMatcher`.

Closes gh-16865
2019-06-07 00:14:01 +02:00
Brian Clozel
16c521a9e6 Auto-configure reactive Elasticsearch components
As of Spring Data Moore, a new reactive template and the
corresponding repositories support have been added.

This commit auto-configures a `ReactiveElasticsearchTemplate`
with the configuration properties under the
`spring.data.elasticsearch.client.reactive` namespace.
To enable this feature, applications require both Spring Data
Elasticsearch dependencies (typically
`spring-boot-starter-data-elasticsearch`) and dependencies
for a `WebClient` (often `spring-boot-starter-webflux`).

The support for the reactive Elasticsearch repositories is
also provided.

Closes gh-16214
2019-06-05 14:22:43 +02:00
Phillip Webb
db75347eb6 Merge branch '2.1.x' 2019-06-04 14:41:20 -07:00
Phillip Webb
0ef331018e Merge branch '2.0.x' into 2.1.x 2019-06-04 14:30:52 -07:00
Phillip Webb
7fc01971ed Merge branch '1.5.x' into 2.0.x 2019-06-04 14:20:25 -07:00
Phillip Webb
d306b31ce9 Merge branch '2.1.x' 2019-06-04 02:08:00 -07:00
Phillip Webb
ccfbd03482 Merge branch '2.0.x' into 2.1.x 2019-06-04 02:07:14 -07:00
Phillip Webb
b442d3b906 Merge branch '1.5.x' into 2.0.x 2019-06-04 01:49:03 -07:00
Phillip Webb
5fba43aa31 Merge branch '1.5.x' into 2.0.x 2019-06-04 00:05:57 -07:00
Brian Clozel
c74badd4f2 Auto-configure Elasticsearch REST client in Spring Data
This commit auto-configures the Elasticsearch REST client support
as a template for Spring Data Elasticsearch. As of this commit,
using the transport client is still possible but developers
should migrate.

This commit also removes the deprecated annotation on the
Elasticsearch auto-configuration for the transport client, since
this deprecation notice is already present on the configuration
property.

Closes gh-17024
Closes gh-16542
2019-06-03 21:20:06 +02:00
Stephane Nicoll
ae5b5be597 Reset flag after each test as well to avoid side effects 2019-06-03 13:29:35 +02:00
Stephane Nicoll
f30e29a4ad Rename spring.reactor.stacktrace-mode.enabled property
Closes gh-16537
2019-06-03 12:18:07 +02:00
Gary Russell
23cff6fb09 KafkaAutoConfigurationIntegrationTests to JUnit5
See gh-17034
2019-06-03 08:41:16 +02:00
Issam El-atif
4ac1407af1 Use new JettyClientHttpConnector constructor
Simplify `ClientHttpConnectorConfiguration`by using the recently
introduced `JettyClientHttpConnector` constructor.

See gh-17015
2019-05-31 15:31:41 -07:00
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
ad5e905bd7 Update copyright header of changed files 2019-05-30 11:30:43 -07:00
Phillip Webb
68aec8b6ee Polish 2019-05-30 11:30:27 -07:00
Dmytro Nosan
54061bd59f Polish CassandraDataAutoConfiguration
See gh-17004
2019-05-30 11:17:22 +02:00
dreis2211
38c21f58b8 Add missing @Test annotation
See gh-17012
2019-05-29 14:41:22 -07:00
Phillip Webb
c84c9409bd Polish 2019-05-29 14:41:01 -07:00