Commit Graph

2256 Commits

Author SHA1 Message Date
Andy Wilkinson
e9aeb9ad63 Polish 2017-08-04 11:00:36 +01:00
Andy Wilkinson
5c06bd5ab9 Merge branch '1.5.x' 2017-08-03 21:23:28 +01:00
Johnny Lim
56f47e1a50 Polish
Closes gh-9938
2017-08-03 21:17:10 +01:00
Andy Wilkinson
9687a5041e Add support for making endpoints accessible via HTTP
This commit adds support for exposing endpoint operations over HTTP.
Jersey, Spring MVC, and WebFlux are all supported but the programming
model remains web framework agnostic. When using WebFlux, blocking
operations are automatically performed on a separate thread using
Reactor's scheduler support. Support for web-specific extensions is
provided via a new `@WebEndpointExtension` annotation.

Closes gh-7970
Closes gh-9946
Closes gh-9947
2017-08-03 18:44:11 +01:00
Stephane Nicoll
4592e071db Add support for making endpoints accessible via JMX
This commit adds support to the new endpoint infrastructure for
exposing endpoint operations via JMX. It also introduces support for
JMX-specific extensions to a general-purpose endpoint. Such an
extension is identified by the `@JmxEndpointExtension` annotation.

See gh-9946
2017-08-03 18:33:59 +01:00
Andy Wilkinson
4f2e4ada45 Introduce the foundations of the new endpoint infrastructure
This commit introduces a new annotation-based programming model for
implementing endpoints. An endpoint is identified by a type-level
`@Endpoint` annotation. Method-level `@ReadOperation` and
`@WriteOperation` are used to identify methods on an endpoint class
that implement an operation and should be exposed (via JMX for
exmaple) to remote clients.

See gh-9946
2017-08-03 18:31:51 +01:00
Andy Wilkinson
7bd285dd93 Polish 2017-08-03 14:39:46 +01:00
Phillip Webb
28b7ec3bed Check POSIX file permissions before writing PID
Update `ApplicationPid` to check POSIX file permissions in addition to
`File.canWrite()` before PID file. This helps to provided consistent
behavior, regardless of if the application is running as root or not.

Fixes gh-9922
2017-07-31 20:56:46 -07:00
Madhura Bhave
e64090838c Revert "Nested Map should not bind to null"
This reverts commit 5406567783.
2017-07-28 13:40:31 -07:00
Madhura Bhave
5406567783 Nested Map should not bind to null
Fixes gh-9801
2017-07-28 10:16:14 -07:00
Vedran Pavic
f84d90dbe7 Fix additional-spring-configuration-metadata.json
This commit fixes invalid references to `LoggingApplicationListener` in
`additional-spring-configuration-metadata.json`.

Closes gh-9890
2017-07-28 13:52:39 +02:00
Andy Wilkinson
c3bc449e34 Merge branch '1.5.x' 2017-07-28 07:35:46 +01:00
Andy Wilkinson
2925f1b86a Polish "Simplify retrieval of Narayana XARecoveryModule"
Closes gh-9725
2017-07-28 07:32:10 +01:00
Gytis Trikleris
3874196efe Simplify retrieval of Narayana XARecoveryModule
See gh-9725
2017-07-28 07:32:01 +01:00
Phillip Webb
9127c48fb5 Fixup warnings 2017-07-27 16:39:49 -07:00
Spring Buildmaster
17a5bb0be4 Next development version 2017-07-27 08:00:21 +00:00
Andy Wilkinson
5616915621 Polishing 2017-07-26 17:40:29 +01:00
Johnny Lim
9b15389009 Polish
Closes gh-9855
2017-07-26 13:39:47 +02:00
Stephane Nicoll
75fc0c38c8 Merge branch '1.5.x' 2017-07-26 13:39:25 +02:00
Johnny Lim
fe1eb8b5f3 Polish
See gh-9855
2017-07-26 13:39:00 +02:00
Spring Buildmaster
41c5c0e7c9 Next development version 2017-07-26 08:30:55 +00:00
Emanuel Campolo
2626a3a795 Use lambdas when possible
Replace anonymous inner classes with lambda declarations (when possible
using method references).

See gh-9781
2017-07-25 00:53:38 -07:00
Emanuel Campolo
798fe5ed53 Collapse catch clauses
Use multi-catch for exceptions whenever possible.

See gh-9781
2017-07-25 00:53:37 -07:00
Emanuel Campolo
4a189bdee7 Replace Collections.sort() with direct sort call
Replace existing `Collections.sort(...)` calls with `.sort(...)`
directly on the collection instance.

See gh-9781
2017-07-25 00:53:37 -07:00
Emanuel Campolo
04fdec6f8b Replace explicit generics with diamond operator
Where possible, explicit generic declarations to use the Java 8 diamond
operator.

See gh-9781
2017-07-25 00:53:37 -07:00
Phillip Webb
3a01f4a6da Polish lambda formatting 2017-07-24 13:18:33 -07:00
Andy Wilkinson
b52ece1ac7 Verify that Java Time config properties can be bound
Closes gh-9237
2017-07-24 16:58:19 +01:00
Andy Wilkinson
6518ffe801 Polish 2017-07-24 16:58:05 +01:00
Andy Wilkinson
0ab81e4f8f Prevent loader classes from being served by executable war
Closes gh-5550
2017-07-24 16:29:56 +01:00
Andy Wilkinson
bc4603925e Configure Jetty to compress responses to requests other than GET
Closes gh-8184
2017-07-22 10:41:53 +01:00
Andy Wilkinson
8207852bcd Ensure that detected request factories are initialized
Closes gh-9797
2017-07-22 08:10:04 +01:00
Andy Wilkinson
0013493402 Move port in use exception test as it does not apply to Tomcat
See gh-8737
2017-07-21 22:23:28 +01:00
Andy Wilkinson
9b6b663cc7 Throw a PortInUseException when Netty start fails with a BindException
Closes gh-8737
2017-07-21 22:03:44 +01:00
Andy Wilkinson
ded7cea761 Prevent webapp class loader from finding resources
Previously, TomcatEmbeddedWebappClassLoader would find resources
in WEB-INF/classes. However, unlike standalone Tomcat, we know that in
a Boot app WEB-INF/classes is on the class path of the parent class
loader so the resources will be found when the parent is queried
(which happens as part of the normal search algortithm for both
getResource(String) and getResources(String)).

This commit overrides findResource(String) and findResources(String)
to return null and an empty enumeration respectively. This prevents
TomcatEmbeddedWebappClassLoader from finding resources in
WEB-INF/classes and returning war: URLs for them that duplicate the
jar: URLs that will be found when the parent is queried.

Closes gh-9014
2017-07-21 20:53:32 +01:00
Andy Wilkinson
00feae7e8a Correct signature of link to sibling method that takes Class[] in 2.0
See gh-8898
2017-07-21 20:07:02 +01:00
Andy Wilkinson
218033fbcb Merge branch '1.5.x' 2017-07-21 19:50:50 +01:00
Andy Wilkinson
f4f54047e0 Clarify behaviour of SpringApplicationBuilder.sibling(Object...)
Closes gh-8898
2017-07-21 19:50:39 +01:00
Johnny Lim
bd27d147d7 Polish
Closes gh-9827
2017-07-21 15:38:00 +01:00
Phillip Webb
2f0f25f5ad Add Configurations class
Add a general purpose `Configurations` class that encapsulates the
sorting and merging rules that are usually apply. The class is
particularly useful in tests where configuration classes often need
to be specified, but an `@Import` or `ImportSelector` cannot be easily
used.

Two `Configurations` subclasses have been initially added. The
`UserConfigurations` class can be used to represent user defined
configuration and the `AutoConfigurations` class can be used to
represent a subset of auto-configurations. Auto configurations are
sorted using the same `@AutoConfiguraionBefore`/`@AutoConfiguraionAfter`
logic as the `@EnableAutoConfiguration` annotation.

Fixes gh-9795
2017-07-19 11:56:21 -07:00
Phillip Webb
9f6d8c6778 Add ConfigurableReactiveWebApplicationContext
Split the current `ReactiveWebApplicationContext` into two distinct
interfaces to mirror other Spring context interfaces. The
`ReactiveWebApplicationContext` interface now only exposes getters. The
`ConfigurableReactiveWebApplicationContext` exposes setters and extends
from `ConfigurableApplicationContext`.

Fixes gh-9794
2017-07-19 11:53:35 -07:00
Brian Clozel
330aa704bb Clean HTTP Resources when NettyWebServer stops
This commit is a temporary workaround for gh-9146; it cleans the HTTP
resources associated with the Netty server.
2017-07-18 17:07:21 +02:00
Brian Clozel
20943238c2 Clean NettyWebServer tests
Remove ununsed tests after gh-9698
2017-07-18 17:06:50 +02:00
Madhura Bhave
c8951ae938 Fix javadoc 2017-07-17 17:38:06 -07:00
Madhura Bhave
eb4fc16ee5 Add customizers for Reactive Web Servers
Closes gh-9572
2017-07-17 15:55:52 -07:00
Madhura Bhave
1a0f21983f Fix tests
Fixes gh-3832
2017-07-17 15:25:31 -07:00
Madhura Bhave
00430ac216 Ignore unbound env variables and system props
Closes gh-3832
2017-07-17 15:09:47 -07:00
Madhura Bhave
93caad5556 Polish 2017-07-14 15:25:40 -07:00
Stephane Nicoll
27aee689e7 Polish "Rename HCP to SAP"
Closes gh-9747
2017-07-13 10:51:17 +02:00
Benjamin Ihrig
c02d5d52c6 Rename HCP to SAP
See gh-9747
2017-07-13 10:49:34 +02:00
dreis2211
d6cebf64d8 Remove duplicate 'the' in BindResult.isBound() javadoc
Closes gh-9738
2017-07-13 10:45:59 +02:00