481 Commits

Author SHA1 Message Date
Phillip Webb
ab6ad6aa4b Polish 2018-01-24 16:09:14 -08:00
Stephane Nicoll
960989cfe6 Polish "Add support for anonymousReadOnly in LdapProperties"
Closes gh-11744
2018-01-24 10:21:33 +01:00
Stephane Nicoll
af0bdc893b Add support for anonymousReadOnly in LdapProperties
See gh-11744
2018-01-24 09:59:03 +01:00
Eddú Meléndez
633aefa844 Move tests to use ApplicationContextRunner 2018-01-24 09:58:35 +01:00
Brian Clozel
145d46e093 Polish 2018-01-23 15:52:44 +01:00
Brian Clozel
be7c0a15f7 Move reactive ErrorAttributes into spring-boot
Closes gh-11714
2018-01-23 11:55:34 +01:00
andrey.onufreyko
b19dcb13e2 Replace string arguments with char
Optimize method calls by replacing single character String arguments
with char.

Closes gh-11680
2018-01-22 16:35:06 -08:00
dreis2211
5f66c09844 Narrow scope of some variables
Closes gh-11743
2018-01-22 16:01:02 -08:00
Stephane Nicoll
126f8783a2 Polish 2018-01-20 11:07:07 +01:00
Phillip Webb
dc935fba48 Polish 2018-01-19 20:44:18 -08:00
Madhura Bhave
d9ff51ccd3 Add StaticResourceRequest for WebFlux Security
Closes gh-11040
2018-01-20 10:00:08 +05:30
Madhura Bhave
5e2cc02499 Move servlet specific security auto-config 2018-01-20 09:41:50 +05:30
Stephane Nicoll
c926bed6f5 Polish "Fix modifiers order"
Closes gh-11681
2018-01-19 11:30:30 +01:00
igor-suhorukov
e2d05607f2 Fix modifiers order
See gh-11681
2018-01-19 11:30:06 +01:00
Brian Clozel
247b7f0842 Fix WebFlux default error view for null exception messages
This commit prevents NullPointerExceptions when the default HTML error
view is being rendered with a `null` message.

Fixes gh-11677
2018-01-19 10:13:59 +01:00
Phillip Webb
f3379668ac Polish 2018-01-18 23:21:51 -08:00
Brian Clozel
c233125f1d Don't render error view if response is committed
This commit prevents the default error view from rendering itself if the
response has been committed already. In this case, it is impossible to
change the HTTP response status and write a proper response - trying to
do so often results in a `IllegalStateException` since the response body
has already been written to.

Fixes gh-11580
2018-01-18 11:40:11 +01:00
Stephane Nicoll
40c537daa0 Polish 2018-01-18 10:20:48 +01:00
Andy Wilkinson
54c0cf513b Polish 2018-01-17 19:03:23 +00:00
Andy Wilkinson
3904f49c9f Configure ServletContext before initializing S…C…Initializer beans
Previously, the ServletContext was configured after any
ServletContextInitializer beans had been initialized. This meant that
any configuration class that provided such a bean would be initialized
before the ServletContext was configured. If the configuration class
used the ServletContext in its initializtaion that it would see it in
its default, unconfigured state.

This commit reworks the configuration of the ServletContext so that
it happens before any ServletContextInitializer beans are initialized.

Closes gh-10699
2018-01-17 17:32:23 +00:00
Johnny Lim
d27b46cf73 Fix a wrong import for SocketChannel
Closes gh-11648
2018-01-17 13:49:57 +01:00
Brian Clozel
1f26a0314c Sanitize inputs in default reactive HTML error view
This commit uses HTML escaping to sanitize error inputs that are
displayed in the default reactive HTML error view.

Fixes gh-11582
2018-01-16 17:20:12 +01:00
Stephane Nicoll
bf88073f7e Tighten Liquibase auto-configuration to require Liquibase 3
Closes gh-11641
2018-01-16 12:02:03 +01:00
Stephane Nicoll
023bc13fb6 Merge branch '1.5.x' 2018-01-16 11:46:42 +01:00
Brian Clozel
1e648801bd Move spring.mvc.media-types to content-negotiation
This commit moves "spring.mvc.media-types" to the
"spring.mvc.content-negotiation.*" namespaces introduced in gh-11105.

Closes gh-11636
2018-01-16 11:35:49 +01:00
Brian Clozel
22c22a1ced Move server.session.* to server.servlet.session.*
Closes gh-11589
2018-01-15 17:50:32 +01:00
Andy Wilkinson
23d8d608c4 Polish 2018-01-15 13:35:46 +00:00
Brian Clozel
67e5897c40 Disable suffix pattern matching in Spring MVC
This commit disables by default suffix pattern matching in Spring MVC
applications. As described in the Spring MVC documentation (see
https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-ann-requestmapping-suffix-pattern-match),
this is considered as best practice.

This change also introduces new configuration properties to achieve
similar results in a safer way (using query parameters) or to rollback
to the former default.

Closes gh-11105
2018-01-15 11:58:26 +01:00
Johnny Lim
77150f8dc9 Polish
Closes gh-11630
2018-01-15 10:20:31 +01:00
Stephane Nicoll
3f88906b97 Fix handling of ResponseStatusException
This commit updates DefaultErrorAttributes to handle
ResponseStatusException explicitly. This exception is used in a
WebFlux application to signal that the processing of the query has
failed with an HTTP status code and a reason phrase. The latter is now
properly mapped to the `message` attribute of the response body.

Closes gh-11614
2018-01-15 10:03:15 +01:00
Andy Wilkinson
2b99962a85 Replace use of Date with OffsetDateTime and Instant in Actuator
Closes gh-10976
2018-01-12 17:26:05 +00:00
Stephane Nicoll
8aaf95b792 Polish 2018-01-12 11:40:35 +01:00
Johnny Lim
136e26e307 Fix typo in DynamicRegistrationBean class name
Closes gh-11606
2018-01-12 01:44:45 +01:00
Stephane Nicoll
4a9123d6e3 Detect user-defined RedisCacheConfiguration
This commits improves the cache auto-configuration for Redis by looking
up a custom "RedisCacheConfiguration" bean that allows to take full
control over the `RedisCacheManager`.

Closes gh-11599
2018-01-11 11:52:08 +01:00
Brian Clozel
98ac2218db Apply server.undertow.* config to reactive servers
This commit applies `server.undertow.*` configuration properties
to Undertow when configured as a reactive web server.

See gh-11500
2018-01-11 11:15:23 +01:00
Brian Clozel
15bc718248 Apply server.jetty.* config to reactive servers
This commit applies `server.jetty.*` configuration properties
to Jetty when configured as a reactive web server.

It also removes some infrastructure support for Jetty 8, which
is not supported anymore in Spring Boot 2.0 (partial fix for
gh-11504).

See gh-11500
2018-01-11 11:15:17 +01:00
Brian Clozel
d264af8142 Apply server.tomcat.* config to reactive servers
This commit applies most `server.tomcat.*` configuration
properties to Tomcat when set up as a reactive web server.

Some Servlet-specific properties are not applied:

* server.tomcat.additional-tld-skip-patterns
* server.tomcat.redirect-context-root
* server.tomcat.use-relative-redirects

Fixes gh-11334
2018-01-11 11:15:02 +01:00
Stephane Nicoll
b2eae0006d Polish "Make GsonAutoConfiguration align with JacksonAutoConfiguration"
Closes gh-11591
2018-01-11 10:36:58 +01:00
Johnny Lim
50518514b0 Make GsonAutoConfiguration align with JacksonAutoConfiguration
See gh-11591
2018-01-11 10:16:35 +01:00
Madhura Bhave
e57aafd63d Provide EndpointRequest for WebFlux-based Security
Closes gh-11022
2018-01-09 16:06:36 -08:00
Phillip Webb
b078698f20 Update copyright year of changed files 2018-01-09 12:13:27 -08:00
Phillip Webb
b3ec2c9d1d Polish 2018-01-09 12:12:59 -08:00
Stephane Nicoll
df647605af Merge branch '1.5.x' 2018-01-09 13:28:08 +01:00
Johnny Lim
b8706c47d6 Use instance equality for Class
Closes gh-11534
2018-01-09 09:30:36 +01:00
Johnny Lim
0f0c6e0729 Polish
Closes gh-11536
2018-01-09 09:28:56 +01:00
Phillip Webb
286a3bb10a Polish GSON customization support
Closes gh-11498
2018-01-08 23:13:46 -08:00
ioann
ba552f1d24 Allow GSON customization via properties or beans
Update GSON support to allow customization with either properties or
customize beans.

See gh-11498
2018-01-08 22:37:55 -08:00
Phillip Webb
9cb5f3da89 Create DynamicRegistrationBean
Extract functionality from the `RegistrationBean` into a new class
designed to work with dynamic registration. Servet and Filter
registration beans now extend from `DynaimcRegistrationBean`, where as
`ServletListenerRegistrationBean` extends directly from
`RegistrationBean`.

This refactor allows the removal of `ServletListenerRegistrationBean`
deprecated methods.

Fixes gh-11344
2018-01-08 22:05:00 -08:00
Phillip Webb
fb614c64da Revert "Build against Spring Security 5.0.1 SNAPSHOT"
This reverts commit 2c52b9e87a3b86a349b4dc4a19adcfdfcf19886b
since the SNAPSHOT BOM doesn't appear to be published.

See gh-11573
2018-01-08 18:09:07 -08:00
Phillip Webb
2d76aad03e Further refine test containers 2018-01-08 17:24:42 -08:00