Commit Graph

525 Commits

Author SHA1 Message Date
Brian Clozel
0e13fd039d Configure HTTP compression for HTTP/2 with Tomcat
This commit ensures that the compression options are also applied on the
`Http2Protocol` when http/2 is enabled with Tomcat.

Closes gh-15591
2019-01-08 14:14:10 +01:00
dreis2211
9ffb4f69cd Polish javadoc of ConfigurableUndertowWebServerFactory method
Closes gh-15536
2018-12-20 18:01:38 +01:00
Andy Wilkinson
0741c90489 Avoid blocking on a Mono indefinitely
Closes gh-15535
2018-12-20 15:31:39 +00:00
Andy Wilkinson
d5c8caab59 Merge branch '1.5.x' into 2.0.x 2018-12-20 10:00:35 +00:00
Andy Wilkinson
2b22b23aad Polish 2018-11-27 20:35:30 +00:00
Stephane Nicoll
e424dfbe15 Polish "Perform best effort to retrieve DataSourceProxy"
Closes gh-15206
2018-11-26 10:18:48 +01:00
Andy Wilkinson
44632ea55c Merge branch '1.5.x' into 2.0.x 2018-11-23 20:15:26 +00:00
Andy Wilkinson
3331fa2d02 Merge branch '1.5.x' into 2.0.x 2018-11-23 16:59:18 +00:00
Phillip Webb
3baf782822 Merge branch '1.5.x' into 2.0.x 2018-11-14 18:24:32 -08:00
Nooheat
8380031039 Simplify ArrayList calling addAll() immediately
Closes gh-15033
2018-11-01 17:10:16 +09:00
Misagh Moayyed
e820f04926 Polish EnableConfigurationPropertiesImportSelector javadoc
Closes gh-15049
2018-11-01 10:13:35 +09:00
Phillip Webb
33c7a74bee Update copyright year for changed files 2018-10-26 16:35:28 -07:00
Phillip Webb
5603d61909 Polish "Consider aliases when checking descendants"
See gh-14967
2018-10-26 16:24:23 -07:00
chang-chao
256ca681fd Consider aliases when checking descendants
Update `AliasedConfigurationPropertySource` to consider aliases in
`containsDescendantOf`.

Prior to this commit, given a source containing `example.name` with
a defined alias of `other.name -> example.name` calling
`containsDescendantOf("other")` would incorrectly return
`ConfigurationPropertyState.ABSENT`.

Closes gh-14967
2018-10-26 16:08:56 -07:00
dreis2211
3fea487c7b Use Errors.hasErrors() in DefaultErrorAttributes
Closes gh-14912
2018-10-22 21:51:21 -07:00
Andy Wilkinson
9b8ead825c Polish 2018-10-18 15:38:06 +01:00
Andy Wilkinson
b78c7aca3e Allow ALPNServerConnectionFactory to negotiate use of HTTP/1.1
Closes gh-14444
2018-10-13 16:56:10 +01:00
Madhura Bhave
a86ba6495c Polish 2018-10-12 18:21:39 -07:00
Madhura Bhave
d2ceb8f7da Polish 2018-10-12 17:59:01 -07:00
Stephane Nicoll
798b37805d Polish "Add support for @ResponseStatus in DefaultErrorAttributes"
Closes gh-14744
2018-10-12 15:57:57 +02:00
Michele Mancioppi
17919749db Add support for @ResponseStatus in DefaultErrorAttributes
This commit adds support for @ResponseStatus in DefaultErrorAttributes
mimicking the semantics of @ResponseStatus in SpringMVC.

Throwables annotated with @ResponseStatus handled by
DefaultErrorAttributes will result in the following error attributes:
* 'status' set as the return value of the HttpStatus#value()
  defined as @ResponseStatus#value()
* 'error' set to the default reason phrase of the HttpStatus
  defined as @ResponseStatus#value()
* 'message' defined as the value of @ResponseStatus#reason(),
  or the default HttpStatus's reason phrase if left unspecified

See gh-14744
2018-10-12 15:47:07 +02:00
Phillip Webb
21ebb94d49 Respect Tomcat's failCtxIfServletStartFails flag
Ensure that if the user has set `failCtxIfServletStartFails` to `true`
using a `ContextCustomizers` any Servlet init exceptions stop the
application from running.

Closes gh-14448
2018-10-11 20:12:01 -07:00
Andy Wilkinson
ddb8694ae2 Merge branch '1.5.x' into 2.0.x 2018-10-10 13:00:17 +01:00
Andy Wilkinson
5d3f30ee94 Honour SSL key and trust store providers when configuring Netty
Closes gh-14714
2018-10-08 12:39:09 +01:00
Andy Wilkinson
d6d59edb35 Merge branch '1.5.x' into 2.0.x 2018-10-08 12:19:52 +01:00
Andy Wilkinson
ca329d3d03 Update Jersey indicator class to one that requires the Servlet API
Previously, if WebFlux and Jersey were on the classpath, but there was
no Servlet API (and no embedded container) on the classpath, the web
application type would be prevented from being reactive. The absence
of the Servlet API would then prevent the web application type from
being servlet so it would be none.

By contrast, if Spring MVC was on the classpath in place of Jersey
the absence of the Servlet API would allow the web application type to
be reactive. This happened because the Spring MVC indicator class is
DispatcherServlet which requires the Servlet API.

This commit updates the Jersey indicator class to be ServletContainer.
This class is both an HttpServlet and a Filter so it too requires the
Servlet API and, therefore, further aligns the deduction behaviour for
Jersey and Spring MVC.

Closes gh-14701
2018-10-06 12:59:25 +01:00
Phillip Webb
6aedb69443 Update copyright year for changed files 2018-10-05 13:31:33 -07:00
Phillip Webb
456d1af443 Polish 2018-10-05 13:30:24 -07:00
Stephane Nicoll
febaf15b61 Guard WebApplicationType detection in case spring web is not present
Closes gh-14589
2018-10-05 16:41:22 +02:00
Phillip Webb
2b6bdfe277 Fix Reactive...Context NPE
Fix possible NPE in `ReactiveWebServerApplicationContext`.

See gh-14666
2018-10-04 10:16:23 -07:00
Phillip Webb
8c896d9376 Improve Reactive...Context thread safety
Refactor `ReactiveWebServerApplicationContext` to improve thread safety
by using a single manager object rather than then trying to synchronize
the `WebServer` and `HttpHandler`.

Closes gh-14666
2018-10-04 07:59:39 -07:00
Stephane Nicoll
1b10d3fcbf Fix missing metadata for nested POJO
This commit fixes missing descriptions and default values when
applicable for `management.server.ssl`, `server.compression`,
`server.http2`, `server.servlet.jsp`, `server.servlet.session` and
`server.ssl`.

Those nested namespace are managed by a POJO that is declared outside
of the module of the target @ConfigurationProperties type using it. As
a result, the annotation processor has no access to the source model and
can't extract the description and the default value, if any.

This commit migrates the misleading field-level Javadoc to manual meta
data for the time being.

Closes gh-14669
2018-10-04 15:49:04 +02:00
Stephane Nicoll
b4c5aea152 Fix detection of WebApplicationType with context class
Closes gh-14589
2018-10-03 14:37:31 +02:00
Phillip Webb
bd9500290e Defer HttpHandler initialization
Update `ReactiveWebServerApplicationContext` so that the `HttpHandler`
bean is not longer created from `onRefresh`, but is instead created
only when the server starts.

Prior to this commit, the WebFlux hander would cause early
initialization of several beans, including Jackson Modules.

Closes gh-14666
2018-10-02 22:57:09 -07:00
Phillip Webb
7afde2ba43 Add another ConfigurationPropertyName.equals test
Include an additional test to ensure that `.equals` works for names
starting with the same value.

See gh-14665
2018-10-02 13:58:31 -07:00
Phillip Webb
3ff20b2440 Restore import-control checkstyle
Restore checkstyle import control and fix a few violations in the
process.

Closes gh-14660
2018-10-02 10:30:14 -07:00
Andy Wilkinson
da1fde6a5f Merge branch '1.5.x' into 2.0.x 2018-10-01 15:38:53 +01:00
Stephane Nicoll
957321492f Merge branch '1.5.x' into 2.0.x 2018-09-20 10:24:57 +02:00
Stephane Nicoll
3469142fec Partially revert 59d911d
This commit restores the public `UsesUnsafeJava` and flag it as
deprecated.

Closes gh-14072
2018-09-05 09:42:18 +02:00
Madhura Bhave
9c82d5c382 Make ApplicationContextServerWebExchangeMatcher and subclasses thread-safe
Fixes gh-14161
2018-09-04 17:06:24 -07:00
Phillip Webb
cafff43022 Update copyright header of changed files 2018-09-04 16:19:05 -07:00
Phillip Webb
9af6b3422f Polish 2018-09-04 16:18:47 -07:00
Stephane Nicoll
ea2fb620b4 Clarify structure of prefixes
Closes gh-14258
2018-08-31 15:23:53 +02:00
Phillip Webb
2e2f91d4a0 Merge branch '1.5.x' into 2.0.x 2018-08-30 15:59:02 -07:00
dreis2211
70add0617a Collapse identical catch blocks
Closes gh-14213
2018-08-27 18:18:06 +02:00
Johnny Lim
fb71174c24 Polish
Closes gh-14184
2018-08-24 11:48:41 +02:00
Madhura Bhave
55406d91d2 Consider dash & underscore when equating indexed elements
Fixes gh-14136
2018-08-21 12:53:25 -07:00
Hiroaki Yoshida
6e86ba12b7 Fix potential infinite recursive loop in toString
Closes gh-14152
2018-08-21 10:02:10 +02:00
Stephane Nicoll
e03f01564a Deprecate EntityManagerFactoryBeanCallback
Closes gh-14083
2018-08-20 14:54:32 +02:00
Stephane Nicoll
e034b383db Fix checkstyle violation
Closes gh-14125
2018-08-20 11:19:01 +02:00