Commit Graph

2288 Commits

Author SHA1 Message Date
Stephane Nicoll
11edff7576 Discover endpoints in parent context
Closes gh-10144
2017-09-01 16:45:52 +02:00
Andy Wilkinson
f49741e3ed Allow an operation to specify the media types that it produces
Closes gh-10118
2017-08-31 13:56:15 +01:00
Phillip Webb
9cb0a81e50 Polish adapt to and from Mono conversion
See gh-10112
2017-08-30 15:38:05 -07:00
Andy Wilkinson
7fc12bc8a3 Polish 2017-08-30 17:34:07 +01:00
Stephane Nicoll
afda0ec129 Default Hibernate DDL auto to none with Flyway/Liquibase
This commit adds a strategy interface to specific if a given DataSource
has its schema managed. The Hibernate auto-configuration uses it to set
it to "none" if a mechanism to initialize the DataSource is
found and "create-drop" otherwise.

Both Flyway and Liquibase implements that strategy interface and
register it in the context accordingly.

Closes gh-9262
2017-08-30 12:42:24 +02:00
Andy Wilkinson
8babd5d4c5 Adapt to and from Mono when calling an operation on an endpoint
This commit adds support for adapting to and from Mono when calling
an operation on an endpoint.

When an endpoint is exposed using WebFlux, a call to a blocking
operation is adapted to return a Mono by dispatching the operation
invocation on a separate thread using Reactor's elastic scheduler.

When an endpoint is exposed using Jersey, a call to an endpoint that
returns a Mono is adapted to return the Mono's result by blocking
until it is available. Note that such adaptation is not necessary when
using Spring MVC as it supports Mono natively.

Closes gh-10112
2017-08-30 10:53:07 +01:00
Stephane Nicoll
b91ceef621 Polish "Polish"
Closes gh-10109
2017-08-30 10:41:51 +02:00
Johnny Lim
db76112700 Polish
See gh-10109
2017-08-30 10:33:53 +02:00
Phillip Webb
2c97d3a5e9 Polish 2017-08-29 15:59:32 -07:00
Stephane Nicoll
4c7088981f Add support for delete operations
This commit adds a `@DeleteOperation` annotation that can be used to
indicate that an endpoint's operation is meant to delete a resource.

Such operation is mapped to a DELETE http method.

Closes gh-10023
2017-08-29 16:45:50 +02:00
Stephane Nicoll
1897d76cda Merge branch '1.5.x' 2017-08-29 14:00:23 +02:00
Paul Vorbach
04ca7f137d Identify and fix incomplete assertions
Several calls to assertThat lacked a following assertion most often due
to wrong use of parenthesis.

See gh-10084
2017-08-29 13:49:28 +02:00
Stephane Nicoll
83eee7e65d Fix XA DataSource class name for Firebird
Closes gh-10102
2017-08-29 13:48:57 +02:00
Johnny Lim
118f65556f Remove unused ExpectedExceptions
Closes gh-10101
2017-08-29 13:19:04 +02:00
Stephane Nicoll
3ef3b40783 Rename EndpointType to EndpointExposure
Closes gh-10100
2017-08-29 11:50:27 +02:00
Phillip Webb
f9e5b07eec Polish endpoint 2017-08-29 11:32:39 +02:00
Stephane Nicoll
f6134a8862 Polish 2017-08-28 11:38:10 +02:00
Madhura Bhave
4990b52b72 Reinstate CloudFoundry support for actuators
Closes gh-9996
2017-08-27 23:15:19 -07:00
Madhura Bhave
bacbe0459b Disable web endpoints by default
Since the handler interceptors have been removed, web endpoints
are all disabled by default to prevent accidental exposure of
sensitive information.

Closes gh-7958
2017-08-27 23:15:18 -07:00
Madhura Bhave
e08ddbf838 Rework security autoconfiguration
This commit combines security autoconfigurations for
management endpoints and the rest of the application. By default,
if Spring Security is on the classpath, it turns on @EnableWebSecurity.
In the presence of another WebSecurityConfigurerAdapter this backs off
completely. A default AuthenticationManager is also provided with a user
and generated password. This can be turned off by specifying a bean of
type AuthenticationManager, AuthenticationProvider or UserDetailsService.

Closes gh-7958
2017-08-27 23:15:18 -07:00
Johnny Lim
4ae3691fee Avoid substring() invocation when the result is itself
Closes gh-10077
2017-08-25 17:37:56 +02:00
Stephane Nicoll
f8e08f79ed Add DispatcherType enum for configuration purpose
This commit creates our own version of javax.servlet.DispatcherType for
configuration purpose as we can use the other one now the servlet api
is optional.

Closes gh-9856
2017-08-24 10:28:59 +02:00
Johnny Lim
14c9f91aab Polish
Closes gh-10054
2017-08-22 16:28:03 +02:00
Brian Clozel
918d803f76 Remove start/stop integration test
This test is not useful in this context.

Closes gh-9889
2017-08-21 16:20:15 +02:00
Stephane Nicoll
2f51340047 Restore WebServerInitializedEvent listener registration
This commit fixes ServerPortInfoApplicationContextInitializer so that
is registers a listener against `WebServerInitializedEvent`.

A former polish to use a lambda actually introduced a regression as the
listener was registered as `ApplicationListener<?>`.

Closes gh-10047
2017-08-20 18:28:35 +02:00
Stephane Nicoll
394371eb73 Polish "Harmonize database initializers"
Closes gh-9752
2017-08-18 18:14:22 +02:00
Johnny Lim
a7ef258069 Polish
Closes gh-10032
2017-08-18 11:28:33 +02:00
Stephane Nicoll
e93f61ba70 Calling delegate on LoaderHidingResource#close()
Closes gh-10025
2017-08-17 14:25:00 +02:00
Stephane Nicoll
35cf0c56a8 Merge branch '1.5.x' 2017-08-14 16:15:17 +02:00
Stephane Nicoll
cabd798353 Polish NestedConfigurationProperty documentation
Closes gh-9895
2017-08-14 16:13:54 +02:00
Gytis Trikleris
4d42d89d71 Upgrade to Narayana 5.5.30.Final
Closes gh-10004
2017-08-14 15:44:46 +02:00
Andy Wilkinson
ee16332745 Update Actuator to use the new endpoint infrastructure
This commit migrates the Actuator onto the new endpoint infrastruture.
In addition to the existing support for accessing the endpoints via
JMX and HTTP using Spring MVC, support for access via HTTP using
Jersey and WebFlux has been added. This includes using a separate
management port where we now spin up an additional, appropriately
configured servlet or reactive web server to expose the management
context on a different HTTP port to the main application.

Closes gh-2921
Closes gh-5389
Closes gh-9796
2017-08-11 16:38:41 +01:00
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