Commit Graph

59 Commits (5e2f18f48b968b5c677fe511f67c02459a87e4f7)

Author SHA1 Message Date
Madhura Bhave 674f2f5a6c EndpointRequest should match @ServletEndpoint
This commit also changes the request matcher for MVC
endpoints to use an AntPathRequestMatcher instead of an
MvcRequestMatcher. The endpoint is always available
under the mapped endpoint path and this way the same matcher
can be used for both MVC and Jersey.

Fixes gh-17912

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
5 years ago
Phillip Webb fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb 913e831f4e Merge '1.5.x' into 2.0.x 5 years ago
Andy Wilkinson 9d28238598 Update formatting of spring-boot-samples 6 years ago
Andy Wilkinson 24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
6 years ago
Phillip Webb f875b74e67 Reformat samples with spring-javaformat 0.0.8
See gh-16418
6 years ago
Madhura Bhave eff2f92c48 Fix formatting following formatter update 6 years ago
Andy Wilkinson 864942ad4f Merge branch '2.0.x' into 2.1.x 6 years ago
Spring Operator 1a4c6f2dac Use HTTPS for external links wherever possible
See gh-16319
6 years ago
Andy Wilkinson e23f72c8b0 Merge branch '2.0.x' into 2.1.x 6 years ago
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 6 years ago
Andy Wilkinson a36aa67b52 Merge branch '2.0.x' into 2.1.x 6 years ago
Spring Operator 3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
6 years ago
Johnny Lim c5b5f752ed Polish
Closes gh-16219
6 years ago
Phillip Webb fc3aa43cc2 Update copyright year for changed files 6 years ago
Madhura Bhave f8e5b9ba47 Fix formatting 6 years ago
Madhura Bhave c3e47541ad EndpointRequest should check that the request is to the mgmt context
Fixes gh-15702
6 years ago
Stephane Nicoll 474da80b4d Revert "Restructure of security packages"
See gh-14412
6 years ago
Madhura Bhave f835f82582 Preliminary restructure of security packages
Restructure the security auto-configuration packages to better reflect
the part of the system that the configuration applies to.

See gh-14412
6 years ago
Madhura Bhave c7b4a992be Fix formatting 6 years ago
Madhura Bhave b93c2b9a9f Allow actuator endpoints to be used with mvcMatchers
This commit changes AbstractWebMvcEndpointHandlerMapping to
be a MatchableHandlerMapping. Additionally, EndpointRequest,
now delegates to MvcRequestMatcher for Spring MVC applications.

For all other applications, AntPathRequestMatcher is used as
a delegate.

Closes gh-13962
6 years ago
Phillip Webb a4b0be089d Polish 7 years ago
Madhura Bhave 89e42d40c5 Provide security matchers for actuator links
Fixes gh-12353
7 years ago
Madhura Bhave e6eca04af2 Make EndpointRequestMatcher#excluding public
Fixes gh-12354
7 years ago
Phillip Webb 0348889fd7 Polish 7 years ago
Brian Clozel 2be0c46562 Remove TestRestTemplate constructors taking template args
As discussed in gh-11872, `TestRestTemplate` constructor variants taking
a `RestTemplate` argument are confusing since the main goal of that
class is to mutate `RestTemplate`.

This commit removes all those constructor variants and replaces them
with `RestTemplateBuilder` arguments when possible.

Closes gh-11872
7 years ago
Stephane Nicoll 7473642f58 Harmonize endpoints exclude property
Closes gh-11914
7 years ago
Andy Wilkinson a09c64e18c Polish 7 years ago
Andy Wilkinson 8605499a64 Provide more control over when the health endpoint shows details
Closes gh-11869
7 years ago
Madhura Bhave e80c22cbf8 Add RequestMatcher for H2 console
Fixes gh-11704
7 years ago
Phillip Webb b234501af3 Polish 7 years ago
Phillip Webb adfb6dc128 Polish 7 years ago
Madhura Bhave d65f9b25bc Remove redundant throws Exception 7 years ago
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
7 years ago
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
7 years ago
Madhura Bhave 5e2cc02499 Move servlet specific security auto-config 7 years ago
Phillip Webb f3379668ac Polish 7 years ago
Madhura Bhave e57aafd63d Provide EndpointRequest for WebFlux-based Security
Closes gh-11022
7 years ago
Andy Wilkinson 93c5900d47 Merge branch '1.5.x' 7 years ago
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
7 years ago
Stephane Nicoll 23218add90 Polish 7 years ago
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
7 years ago
Phillip Webb 07f71e889e Move `/application` to `/actuator`
Change the endpoint default path from `/application` to `/actuator`.

Fixes gh-10970
7 years ago
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
7 years ago
Madhura Bhave 50a3c2fe2a Rename test to a more suitable name 7 years ago
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
7 years ago
Stephane Nicoll 512030f4fa Polish "Samples cleanup"
Closes gh-10548
7 years ago
Ivan Sopov d8fa71bc97 Samples cleanup
- Modifying dependencies to starter-web with tomcat exclusion plus
  alternative servlet container instead of manual dependency on
  spring-webmvc as it is the preferrable way to use alternative servlet
  container
- Previously RestTemplate with ssl was configured manually in tests - now
  it rellies on autoconfiguration - changed this for multi-connector test
  and added test to ensure that ssl autoconfiguration is working
- Most samples with alterntative servlet containers used some kind of
  service reading property and returning default since it wasn't
  configured - removed it, since it is not specific to using alternative
  servlet containers.

See gh-10548
7 years ago
Phillip Webb c55b5d7111 Polish 7 years ago
Andy Wilkinson 66b55defa0 Adapt to password encoder changes in Spring Security
Closes gh-10762
7 years ago