Commit Graph

1152 Commits

Author SHA1 Message Date
Madhura Bhave
decaacddce Account for application path for Jersey servlet endpoints
Closes gh-14895
2018-11-28 17:25:32 -08:00
Stephane Nicoll
114347107e Polish key description 2018-11-28 11:31:48 +01:00
Alon Bar-Lev
108f28417e Allow to disable SSL client authentication on the management port
When server and management are at different ports, and when server
requires TLS client authentication, then there is no simple method to
disable TLS client authentication for management port.

This commit adds an additional "none" option to ssl.client-auth.

Example:

    server.port=8080
    server.ssl.enabled=true
    server.ssl.client-auth=need
    management.server.port=8081
    management.server.ssl.enabled=true
    management.server.ssl.client-auth=none

See gh-14985
2018-11-28 11:29:21 +01:00
dreis2211
17f04b8b75 Replace DirectFieldAccessor usages by hasFieldOrPropertyWithValue
Closes gh-15312
2018-11-28 08:47:41 +01:00
Andy Wilkinson
cf7664c01a Cope with version not found in Embedded Mongo's Version enum
Closes gh-15311
2018-11-27 16:33:22 +00:00
Andy Wilkinson
b094e28081 Remove auto-configuration of RequestContextFilter when using Jersey
Closes gh-15048
2018-11-27 15:39:46 +00:00
Andy Wilkinson
fb3deab89d Merge branch '2.0.x' 2018-11-27 13:55:33 +00:00
Andy Wilkinson
e81abc3f11 Order jacksonCodecCustomizer so user-provided customizer can go after it
Closes gh-15167
2018-11-27 13:51:33 +00:00
Andy Wilkinson
f6a22a05b8 Merge branch '2.0.x' 2018-11-27 11:21:22 +00:00
Andy Wilkinson
9553d4f64b Polish "Auto-configure Spring Session's cookie serializer"
Closes gh-15163
2018-11-27 11:08:15 +00:00
Vedran Pavic
0daf83efab Auto-configure Spring Session's cookie serializer
See gh-15163
2018-11-27 11:08:05 +00:00
Stephane Nicoll
8928cd1982 Deprecate spring.rabbitmq.template.queue
Closes gh-15301
2018-11-27 09:55:45 +01:00
Stephane Nicoll
a240e22593 Adapt to Rabbit internal change
See gh-15271
2018-11-27 08:31:46 +01:00
Andy Wilkinson
073ac7bc99 Fix Thymeleaf security dialect tests on Windows 2018-11-26 16:15:15 +00:00
Stephane Nicoll
ae1979f1ff Merge branch '2.0.x' 2018-11-26 10:35:37 +01:00
Stephane Nicoll
5f0ac46d78 Unwrap DataSource target rather than plain instanceof calls
Closes gh-15227
2018-11-26 10:35:10 +01:00
Stephane Nicoll
e424dfbe15 Polish "Perform best effort to retrieve DataSourceProxy"
Closes gh-15206
2018-11-26 10:18:48 +01:00
Tadaya Tsuyukubo
26f9a92837 Perform best effort to retrieve DataSourceProxy
Prior to this commit, `DataSourceJmxConfiguration` with tomcat
`DataSource`, it can only find `DataSourceProxy` if the given
`DataSource` is a direct child of it.  Since it uses `instanceof`, it
could not find `DataSourceProxy` if the `DataSource` is
wrapped(delegated) or proxied.

This is because `DataSourceProxy#unwrap()` always returns null; thus
cannot use this method to directly obtain `DataSourceProxy`.

In this commit, updated the check logic to perform the best effort to
retrieve `DataSourceProxy`. If given `DataSource` is wrapped or proxied
by spring, tries to unwrap or get target datasource recursively to find
`DataSourceProxy`.

See gh-15206
2018-11-26 10:18:48 +01:00
Andy Wilkinson
4f405ed97d Merge branch '2.0.x' 2018-11-23 15:45:13 +00:00
Andy Wilkinson
058428a14c Clarify how multiple attributes are treated by ConditionalOn(Missing)Bean
Closes gh-15177
2018-11-23 15:44:58 +00:00
Andy Wilkinson
3bda78a3d3 Fix tests after HandlerExceptionResolver logging changes
See gh-14936 and gh-15189
2018-11-22 20:27:19 +00:00
Dave Syer
b6aff10244 Temporarily make @Bean methods in Spring Data JDBC public
Closes gh-15097
2018-11-16 14:53:33 +01:00
Stephane Nicoll
c1b1f14f5a Fix default unit for multipart properties
This commit fixes a regression that wrongly changed the default unit of
multipart properties from bytes to megabytes.

Closes gh-15162
2018-11-15 09:17:26 +01:00
Stephane Nicoll
2f4325d00f Polish 2018-11-15 09:06:44 +01:00
Brian Clozel
d84421b7e1 Improve HttpMessageConverters javadoc
Closes gh-15027
2018-11-14 15:06:41 +01:00
Johnny Lim
fd5aa3ebf1 Polish
See gh-15134
2018-11-11 11:03:13 +01:00
Stephane Nicoll
089ef9085a Polish "Add HANA to the lookup of well-known databases"
Closes gh-15125
2018-11-10 18:02:01 +01:00
Jonathan Bregler
85754eaddd Add HANA to the lookup of well-known databases
See gh-15125
2018-11-10 17:59:29 +01:00
Andy Wilkinson
e7d921c216 Align test expectations with styling of stack trace div
Closes gh-15075
2018-11-08 12:31:21 +00:00
Andy Wilkinson
bfb0886495 Tolerate Hibernate 5.2
Closes gh-15100
2018-11-08 12:24:22 +00:00
Brian Clozel
159f947870 Polish
Closes gh-15075
2018-11-07 09:40:11 +01:00
up-to-you
ae4bc48481 Fix stack-trace line breaks in whitelabel error views
Since gh-12838, the WebFlux whitelabel error view also shows the
stacktrace information if it is available in the model.

This commit adds a CSS directive that preserves white spaces and breaks
lines at newline characters.
2018-11-07 09:40:11 +01:00
dreis2211
3e95af2c85 Polish some Map operations
Closes gh-15103
2018-11-06 07:41:55 +01:00
dreis2211
5e35ac6ce5 Remove unused static methods in tests
Closes gh-15084
2018-11-05 07:38:49 +01:00
Stephane Nicoll
0bd69fded8 Fix detection of ScheduledExecutorService
`@EnableScheduling` detects primarily a suitable `TaskScheduler` in the
context and fallbacks to the presence of a `ScheduledExecutorService` if
that is not the case.

This commit improves the auto-configuration to back off when such
scheduled executor service is present, so that the framework
initialization code can pick it up as usual.

Closes gh-15032
2018-11-04 09:58:41 +01:00
Brian Clozel
da53a0b8d5 Fix HTTP status error template rendering in WebFlux
Prior to this commit, a change in `HttpStatus.toString` since SPR-16898
prevented the default WebFlux `ErrorWebExceptionHandler` to render
template views for exact HTTP status (e.g. "404.html").
This issue does not affect the resolution of series, like "4xx.html".

This commit fixes `DefaultErrorWebExceptionHandler` to use
`HttpStatus.value()` when attempting to resolve error views.

Closes gh-15083
2018-11-03 21:28:48 +01:00
Stephane Nicoll
980d8ea0ad Merge branch '2.0.x' 2018-11-01 17:49:56 +09:00
Stephane Nicoll
2927195b02 Fix StaticResourceRequest javadoc examples
Closes gh-15050
2018-11-01 17:48:56 +09:00
Phillip Webb
f3fa20b2d1 Polish 2018-10-29 14:25:45 -07:00
Andy Wilkinson
743782de7e Revert reloadable message source support
Closes gh-14882
See gh-14699
See gh-13377
2018-10-29 16:24:59 +00:00
Andy Wilkinson
f492285999 Polish "Make auto-configured applicationTaskExecutor bean lazy"
Closes gh-14934
2018-10-29 12:15:04 +00:00
artsiom
4f92e857e9 Make auto-configured applicationTaskExecutor bean lazy
See gh-14934
2018-10-29 12:14:03 +00:00
Andy Wilkinson
0e08d379ae Polish "Add CachingMetadataReaderFactoryPostProcessor earlier in context lifecyle"
See gh-14907
2018-10-29 11:36:49 +00:00
Dave Syer
c1022e74cd Add CachingMetadataReaderFactoryPostProcessor earlier in context lifecyle
An initializer that adds a BeanDefinitionRegistryPostProcessor which
in turn adds bean definitions has to be very careful to run early.
Otherwise, other initializers that want to influence the bean
definitions added never get a chance.

Closes gh-14907
2018-10-29 11:36:10 +00:00
Phillip Webb
22c7546607 Polish 2018-10-28 21:05:54 -07:00
Phillip Webb
1451c0c069 Polish "Restore max-http-header-size default value support"
Fix Jetty and Undertow customizers to restore Spring Boot 2.0
behavior where a negative or zero `max-http-header-size` indicates
that the server default should be used.

Closes gh-14986
2018-10-28 21:04:17 -07:00
Bryan Turner
8b40ce14cb Restore max-http-header-size default value support
Fix `TomcatWebServerFactoryCustomizer` to restore Spring Boot 2.0
behavior where a negative or zero `max-http-header-size` indicates
that the server default should be used.

See gh-14986
2018-10-28 20:56:51 -07:00
Phillip Webb
1a0a8470e5 Merge branch '2.0.x' 2018-10-26 13:37:39 -07:00
Phillip Webb
62b9268cec Polish "Fix Spring Batch job restart parameters handling"
See gh-14933
2018-10-26 13:30:50 -07:00
Mahmoud Ben Hassine
ad3c3ad361 Fix Spring Batch job restart parameters handling
Fix the `JobLauncherCommandLineRunner` to correctly deal with job
parameters when restarting a job.

Prior to this commit, we were was calling the `getNextJobParameters`
method of the `JobParametersBuilder` from batch. This method was getting
the previous parameters of the wrong job instance in a restart scenario.

This commit fixes the issue by first getting the right job instance with
the provided parameters, then restarting it.

Closes gh-14933
2018-10-26 13:24:02 -07:00
Vedran Pavic
6e967fe860 Upgrade to Hazelcast 3.11
Closes gh-14949
2018-10-25 15:57:59 -07:00
Hanope
65e3b9ff5b Fix typos
Closes gh-14954
2018-10-26 07:34:58 +09:00
Brian Clozel
755c4b8b98 Update spring.mvc.log-resolved-exception description
Closes gh-14936
2018-10-25 11:04:20 +02:00
Phillip Webb
2097b6a4c1 Improve ResourceUrlEncodingFilter conditions
Update Thymeleaf and FreeMarker configurations to make use of the new
`@ConditionalOnMissingFilterBean` annotation.

Closes gh-14926
2018-10-24 15:10:49 -07:00
Phillip Webb
44a46f1514 Add @ConditionalOnMissingFilterBean
Add a new condition that can be used to check for servlet `Filter`
beans that are either registered directly, or via a
`FilterRegistrationBean`.

Closes gh-14940
2018-10-24 15:10:49 -07:00
Phillip Webb
9f858e759c Support parameterizedContainer in bean conditions
Add a `parameterizedContainer` attribute to `ConditionalOnBean` and
`ConditionalOnMissingBean` which can be used to support generic types
when checking for the presence of beans.

Closes gh-14940
2018-10-24 15:10:49 -07:00
Phillip Webb
4d3d711e0e Migrate ConditionalOnMissingBeanTests to context runner 2018-10-24 15:10:49 -07:00
Phillip Webb
1bd1ffdb60 Polish 2018-10-24 15:10:49 -07:00
dreis2211
4857b45ea5 Replace lambdas with method reference or call
Closes gh-14937
2018-10-24 10:12:36 +02:00
Brian Clozel
1651690d57 Fix tests after HandlerExceptionResolver logging changes
See gh-14936
2018-10-23 15:34:06 +02:00
Madhura Bhave
0dc4afdefd Merge branch '2.0.x' 2018-10-22 15:05:16 -07:00
Madhura Bhave
d6991e6d91 Fix formatting violation 2018-10-22 15:02:31 -07:00
Phillip Webb
31335bb50f Merge branch '2.0.x' 2018-10-22 14:35:03 -07:00
Phillip Webb
35221c1142 Polish 2018-10-22 14:26:01 -07:00
Phillip Webb
de7eeb5014 Fix ResourceUrlEncodingFilter conditions
Fix `ResourceUrlEncodingFilter` conditions which were inadvertently
changed in commits 64f04fce and 6cc272ec and would back off if any
`FilterRegistrationBean` was found.

The updated conditions restores the behavior of Spring Boot 2.0.5 and
allows users to directly register their own `ResourceUrlEncodingFilter`
beans (as long as they don't use a `FilterRegistrationBean`).

Fixes gh-14897
2018-10-22 14:17:49 -07:00
Andy Wilkinson
22e722d9f9 Polish 2018-10-18 15:51:20 +01:00
Johnny Lim
c8c3f59e93 Polish
Closes gh-14884
2018-10-18 09:36:27 +02:00
Stephane Nicoll
474da80b4d Revert "Restructure of security packages"
See gh-14412
2018-10-17 12:22:51 +02:00
Stephane Nicoll
3dc74fea4b Polish 2018-10-16 15:55:07 +02:00
Stephane Nicoll
134682a7de Add error metadata for properties removed recently 2018-10-16 15:55:07 +02:00
Andy Wilkinson
bd0a41d82d Merge branch '2.0.x' 2018-10-16 13:31:35 +01:00
Brian Clozel
96fc92609d Polish
Closes gh-14849
2018-10-16 12:23:04 +02:00
Daniel Fernández
56c1247bbb Add new config keys for Thymeleaf 3.0.10 features
This commit adds the following configuration properties:

* `spring.thymeleaf.render-hidden-markers-before-checkboxes`
* `spring.thymeleaf.servlet.produce-partial-output-while-processing`
2018-10-16 12:23:04 +02:00
Johnny Lim
7f9671fd14 Polish
Closes gh-14843
2018-10-16 11:38:51 +02:00
Stephane Nicoll
39f8b685df Merge branch '2.0.x' 2018-10-16 11:38:39 +02:00
Johnny Lim
47daf96c48 Polish
See gh-14843
2018-10-16 11:37:02 +02:00
Brian Clozel
8397878857 Polish
See gh-12838
2018-10-16 10:35:25 +02:00
Phillip Webb
29707bf75a Complete restructure of security packages
Complete the restructuring of the security auto-configuration
packages by removing the direct import of web configuration from
the main security auto-configuration.

Closes gh-14412
2018-10-16 01:01:11 -07:00
Madhura Bhave
f835f82582 Preliminary restructure of security packages
Restructure the security auto-configuration packages to better reflect
the part of the system that the configuration applies to.

See gh-14412
2018-10-16 01:01:10 -07:00
Phillip Webb
b8bc4c6f3c Delete deprecated SecurityPrerequisite
Remove `SecurityPrerequisite` which was deprecated in 2.0.6.

See gh-14846
2018-10-15 22:02:09 -07:00
Phillip Webb
d558a1a762 Merge branch '2.0.x' 2018-10-15 22:01:25 -07:00
Phillip Webb
8ecb659a35 Deprecate SecurityPrerequisite
Deprecate `SecurityPrerequisite` interface since we don't support it
in Spring Boot 2.

Closes gh-14846
2018-10-15 21:00:53 -07:00
Brian Clozel
2c3e8de959 Include "trace" info in whitelabel error views
This commit shows the stacktrace information in default WhiteLabel error
views for Spring MVC and Spring WebFlux.

This information is only shown if it is present in the model map, which
depends on the `server.error.include-stacktrace` configuration property.

Closes gh-12838
2018-10-15 22:22:36 +02:00
Andy Wilkinson
e53e8bf79f Merge branch '2.0.x' 2018-10-15 15:29:10 +01:00
Andy Wilkinson
0fedf8d2af Keep Liquibase-specific DataSource open for use by LiquibaseEndpoint
Closes gh-13832
2018-10-15 15:26:26 +01:00
Andy Wilkinson
ab7c1af3ec Auto-configure SpringSecurityDialect for v5 and deprecate v4
Closes gh-14828
2018-10-15 12:18:40 +01:00
Brian Clozel
d5236b91ce Polish 2018-10-15 10:59:38 +02:00
artsiom
9e5f171510 Support cachecontrol config property in WebFlux
Closes gh-14724
2018-10-15 10:59:38 +02:00
Stephane Nicoll
1a0d53dec0 Replace ReflectionTestUtils usage by hasFieldOrPropertyWithValue
Closes gh-14696
2018-10-15 08:25:10 +02:00
Andy Wilkinson
6e5310900b Switch from thymeleaf-extras-springsecurity4 to extras-springsecurity5
Closes gh-14806
2018-10-13 19:57:04 +01:00
Brian Clozel
2588a71ac4 Auto-Configure HTTP ResourceFactories on servers
This commit auto-configures HTTP resource factories on both Reactor
Netty and Jetty server instances. This creates `ReactorResourceFactory`
and `JettyResourceFactory` beans when necessary - those beans can be
reused and applied by the client auto-configuration in order to share
resources between client and server for optimal performance.

The server auto-configuration has the highest precedence, so from now
on, the auto-configured ResourceFactory bean on the client side will be
skipped if a reactive server is configured.

Closes gh-14495
2018-10-12 11:32:55 +02:00
Stephane Nicoll
11efe92ce7 Polish "Configure Cassandra JMX Reporting"
Closes gh-14778
2018-10-12 10:41:47 +02:00
Phillip Webb
d102e0d7f7 Introduce Ordered Filter and WebFilter interfaces
Add `Ordered` variants of `javax.servlet.Filter` and
`org.springframework.web.server.WebFilter` mainly so that we can
deprecate `FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER`.

Closes gh-14793
2018-10-11 23:13:23 -07:00
Phillip Webb
d6df7cf324 Update copyright year for changed files 2018-10-11 22:39:43 -07:00
Madhura Bhave
ff35d14170 Change order of loggingCodecCustomizer
It is set to 0 so that users' customizers can be positioned before and
after it.

Fixes gh-14723
2018-10-11 13:40:57 -07:00
Brian Clozel
43966c7f93 Configure WebFlux HiddenHttpMethodFilter with property
This commit adds a new configuration property
`"spring.webflux.hiddenmethod.filter.enable"` that enables/disables the
`HttpHiddenMethodFilter` in Spring WebFlux.

Closes gh-14520
2018-10-11 18:15:27 +02:00
artsiom
8f3b58fa98 Replace ReflectionTestUtils usage by hasFieldOrPropertyWithValue
Closes gh-14783
2018-10-11 17:49:37 +02:00
Stephane Nicoll
d37df3d718 Add support for customizing Flyway's configuration
Closes gh-14786
2018-10-11 17:45:20 +02:00
Stephane Nicoll
e789bc0bb7 Use FluentConfiguration to configure Flyway
This commit stops binding the Flyway object directly to the environment
as mutating it will no longer be supported in Flyway 6.

This commit mirrors Flyway's configuration in FlywayProperties for the
most part.

Closes gh-14776
2018-10-11 17:45:15 +02:00
Andy Wilkinson
459d2943e7 Polish 2018-10-11 12:29:49 +01:00