Commit Graph

1316 Commits

Author SHA1 Message Date
Phillip Webb adfb6dc128 Polish 2018-01-25 13:20:29 -08:00
Andy Wilkinson 3565961d68 Rework HTTP exchange tracing and add support for WebFlux
Closes gh-9980
2018-01-25 13:27:07 +00:00
Madhura Bhave d65f9b25bc Remove redundant throws Exception 2018-01-25 17:25:38 +05:30
Phillip Webb 017efda6ec Add @EndpointServlet and migrate Jolokia
Add first class support for Servlet based endpoints and rework the
Jolokia endpoint to use it.

Fixes gh-10264
2018-01-24 17:06:13 -08:00
Johnny Lim 768e7c07e6 Polish
Closes gh-11720
2018-01-22 16:06:45 -08:00
Phillip Webb bda9b892b3 Add direct WebFlux and WebMvc endpoint support
Add `@ControllerEndpoint` and `@RestControllerEndpoint` annotations that
can be used to develop a Spring-only request mapped endpoint. Both
Spring MVC and Spring WebFlux are supported.

This feature is primarily for use when deeper Spring integration is
required or when existing Spring Boot 1.5 projects want to migrate to
Spring Boot 2.0 without re-writing existing endpoints. It comes at the
expense of portability, since such endpoints will be missing from
Jersey.

Fixes gh-10257
2018-01-19 21:06:32 -08:00
Phillip Webb 1d39feffea Overhaul actuator endpoint code
Refactor several areas of the actuator endpoint code in order to make
future extensions easier. The primary goal is to introduce the concept
of an `ExposableEndpoint` that has technology specific subclasses and
can carry additional data for filters to use. Many other changes have
been made along the way including:

* A new EndpointSupplier interface that allows cleaner separation of
  supplying vs discovering endpoints. This allows cleaner class names
  and allows for better auto-configuration since a user can choose to
  provide their own supplier entirely.

* A `DiscoveredEndpoint` interface that allows the `EndpointFilter`
  to be greatly simplified. A filter now doesn't need to know about
  discovery concerns unless absolutely necessary.

* Improved naming and package structure. Many technology specific
  concerns are now grouped in a better way. Related concerns are
  co-located and concepts from one area no longer leakage into another.

* Simplified `HandlerMapping` implementations. Many common concerns have
  been pulled up helping to create simpler subclasses.

* Simplified JMX adapters. Many of the intermediary `Info` classes have
  been removed. The `DiscoveredJmxOperation` is now responsible for
  mapping methods to operations.

* A specific @`HealthEndpointCloudFoundryExtension` for Cloud Foundry.
  The extension logic used to create a "full" health endpoint extension
  has been made explicit.

Fixes gh-11428
Fixes gh-11581
2018-01-19 20:44:24 -08: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
Phillip Webb f3379668ac Polish 2018-01-18 23:21:51 -08:00
Andy Wilkinson 6fb629227c Fix race condition in SampleQuartzApplicationTests 2018-01-17 20:56:42 +00:00
Stephane Nicoll 51f0d88eec Polish "Add test to spring-boot-sample-quartz"
Closes gh-11621
2018-01-17 14:31:52 +01:00
Eddú Meléndez 5f1f04a33a Add test to spring-boot-sample-quartz
See gh-11621
2018-01-17 14:27:02 +01:00
Andy Wilkinson 5b8a2f9675 Improve context hierarchy handling in Actuator endpoints
Previously, a number of Actuator endpoints ignored a context hierarchy
or assumed that it would always be linear. This commit reworks the
affected endpoints so that the no longer assume a linear hierarchy.

A side-effect of a non-linear hierarchy is that there may be multiple
different beans with the same name (in a linear hierarchy, a bean
with the same name as one in an ancestor context, replaces that bean).
The affected endpoints have also been updated so that, when bean names
are used as keys, those keys are grouped by application context. This
prevents a bean in one context from accidentially overwriting a bean
in another context.

Closes gh-11019
2018-01-16 09:53:52 +00:00
Brian Clozel 22c22a1ced Move server.session.* to server.servlet.session.*
Closes gh-11589
2018-01-15 17:50:32 +01:00
Johnny Lim 77150f8dc9 Polish
Closes gh-11630
2018-01-15 10:20:31 +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 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
Andy Wilkinson 93c5900d47 Merge branch '1.5.x' 2018-01-05 12:06:01 +00:00
Andy Wilkinson a9811e360a Add missing copyright headers to .java source files 2018-01-05 12:04:34 +00:00
Andy Wilkinson 5bbd31e7a3 Rename test classes so that their tests are run by Maven 2018-01-05 11:49:39 +00:00
Andy Wilkinson 268b97bf98 No-op ResetMocksTestExecutionListener when Mockito is not present
Closes gh-11508
2018-01-05 11:13:36 +00:00
Stephane Nicoll ac004eabf3 Update copyright header
See gh-11510
2018-01-05 10:30:43 +01:00
Johnny Lim 37d8eedae3 Polish
Closes gh-11510
2018-01-05 10:29:22 +01:00
Madhura Bhave 732d9868e3 Increase session timeout to prevent CI failures 2018-01-03 11:12:41 -08:00
Stephane Nicoll afba8fed79 Harmonize management.server.context-path property
This commit moves management.server.context-path to
management.server.servlet.context-path to align with the configuration
key for the application's main context path.

Closes gh-11359
2017-12-28 12:08:51 +01:00
Phillip Webb ed2460b091 Add support for animated GIFs
Update ImageBanner to support animated GIFs. Animations rely on ANSI
cursor codes so don't work so well in an IDE. They do, however, work
when running the app from a terminal.

See also commit 47bc5e71ab

Closes gh-11118
2017-12-13 14:58:11 -08:00
Stephane Nicoll 681fdb1ee8 Property detect Health web extension with management context
Previously, the Health web extension was defined in the management
context and, as a result, it wasn't found when a separate port was
required. The side effect is that anything that the health web extension
does was not active anymore in that case.

This commit makes sure that the extension is always defined as part of
the main context where operations are discovered and merged.

Closes gh-11285
2017-12-13 17:47:18 +01:00
Stephane Nicoll 1fdc1e373c Polish 2017-12-13 15:43:30 +01:00
Stephane Nicoll 23218add90 Polish 2017-12-12 11:57:30 +01:00
Madhura Bhave 47ed096981 Make default username and password configurable
Closes gh-10963
2017-12-11 15:15:47 -08:00
Johnny Lim 6d54072e04 Remove "final" keywords
Closes gh-11294
2017-12-08 11:13:07 -08:00
Brian Clozel eec7a8f075 Remove Web depedency from Freemarker starter
Now that Spring Boot supports Freemarker for both Spring MVC and Spring
WebFlux, the dedicated starter should not pull the Web starter
transitively and let developers manually choose the web stack.

Closes gh-11246
2017-12-03 11:23:43 -08:00
Stephane Nicoll 8efb608b7e Fixup version numbers following release 2017-11-28 12:28:33 +01:00
Spring Buildmaster df2ae7aa19 Next Development Version 2017-11-28 09:55:46 +00:00
Stephane Nicoll dfc0e392ed Polish "Fix references to management related properties"
Closes gh-11091
2017-11-23 10:57:18 +01:00
Vedran Pavic 63aef58d30 Fix references to management related properties
See gh-11091
2017-11-23 10:48:37 +01:00
Phillip Webb 07f71e889e Move `/application` to `/actuator`
Change the endpoint default path from `/application` to `/actuator`.

Fixes gh-10970
2017-11-22 23:18:22 -08:00
Phillip Webb 4412285c45 Polish Spring Session WebFlux sample
Closes gh-11055
2017-11-22 22:01:58 -08:00
Vedran Pavic a8c027ba8e Add Spring Session WebFlux sample
See gh-11055
2017-11-22 22:01:58 -08:00
Phillip Webb 31025d9f6c Drop status endpoint
Drop the status endpoint and merge functionality back into the health
endpoint. The `management.endpoint.health.show-details` property can
be used to change if full details, or just the status is displayed.

Fixes gh-11113
2017-11-22 22:01:58 -08:00
Johnny Lim 73c65286ea Polish 2017-11-18 10:07:30 -08:00
Johnny Lim 1783a072ad Remove explicit constructor super() calls
Closes gh-11068
2017-11-17 16:44:16 -08:00
Madhura Bhave 50a3c2fe2a Rename test to a more suitable name 2017-11-17 12:24:22 -08:00
Madhura Bhave 4a41c02926 Update redirect-uri-template in oauth sample and docs
Fixes gh-11014
2017-11-17 11:29:01 -08:00
Johnny Lim e8563c54dd Polish
Closes gh-11050
2017-11-17 09:56:16 +01:00
Phillip Webb fd5c43cdc9 Separate endpoint concerns
Update endpoint code to provide cleaner separation of concerns.
Specifically, the top level endpoint package is no longer aware of
the fact that JMX and HTTP are ultimately used to expose endpoints.
Caching concerns have also been abstracted behind a general purpose
`OperationMethodInvokerAdvisor` interface.

Configuration properties have been refined to further enforce
separation. The `management.endpoint.<name>` prefix provides
configuration for a  single endpoint (including enable and cache
time-to-live). These  properties are now technology agnostic (they
don't include `web` or `jmx` sub properties).

The `management.endpoints.<technology>` prefix provide exposure specific
configuration. For example, `management.endpoints.web.path-mapping`
allow endpoint URLs to be changed.

Endpoint enabled/disabled logic has been simplified so that endpoints
can't be disabled per exposure technology. Instead a filter based
approach is used to allow refinement of what endpoints are exposed over
a given technology.

Fixes gh-10176
2017-11-15 14:41:38 -08:00
Phillip Webb f647f5689f Polish 2017-11-15 12:47:47 -08:00