Commit Graph

1186 Commits

Author SHA1 Message Date
Phillip Webb 60355e0e11 Fix ResourceHttpRequestHandler delegate
Fix ResourceHttpRequestHandler to set the ServletContext following the
Spring Framework update for SPR-14851.
2016-10-31 15:04:43 -07:00
Stephane Nicoll 6d50e26b70 Polish contribution
Closes gh-7215
2016-10-30 10:57:58 +01:00
Johnny Lim eb7c0e4dc8 Remove unused
Closes gh-6966
2016-10-24 10:07:10 +02:00
Phillip Webb 3326841a97 Formatting 2016-10-03 22:19:35 -07:00
Phillip Webb 39ed0d4dfb Polish 2016-10-03 21:58:13 -07:00
Stephane Nicoll 8c1b736bb0 Fix list property to be mutable
Closes gh-7068
2016-10-03 10:40:46 +02:00
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Andy Wilkinson 155cfb1805 Fix boot curies href when server has custom servlet path
Previously, the servlet path was being applied twice. Once by the
code that sets up the DefaultCurieProvider and once by the provider
itself which uses ServletUriComponentBuilder's
fromCurrentServletMapping() to build the application URI.

This commit removes the duplicate logic when creating the
DefaultCurieProvider.

Closes gh-6585
2016-09-19 12:40:38 +01:00
Phillip Webb 825dd0a26c Merge branch '1.3.x' 2016-09-16 15:07:18 -07:00
Phillip Webb 3172d434a7 Polish
Closes gh-6835
2016-09-16 13:31:54 -07:00
Phillip Webb c56f30fd91 Formatting 2016-09-12 12:44:31 -07:00
Stephane Nicoll c662986628 Merge branch '1.3.x' 2016-09-12 16:30:25 +02:00
Stephane Nicoll 6eb0449aa9 Use BDD mockito
See gh-6869
2016-09-12 16:30:07 +02:00
Stephane Nicoll d87d60f746 Merge branch '1.3.x' 2016-09-12 16:02:28 +02:00
Stephane Nicoll b88cb35ea2 Fix JMS health indicator
This commit improves the JMS health indicator to identify a broken broker
that uses failover. An attempt to start the connection is a good way to
make sure that it is effectively available.

Closes gh-6818
2016-09-12 15:59:18 +02:00
Phillip Webb 3570f7730a Prevent erroneous "empty locations" log warnings
Update our `ResourceHttpRequestHandler` subclass so that the following
warning is no longer displayed:

  "Locations list is empty. No resources will be served unless a
  custom ResourceResolver is configured as an alternative to
  PathResourceResolver."

Fixes gh-6791
2016-09-09 13:19:58 -07:00
Vedran Pavic d87bec11fb Include AuditEvent details in AuditListener
Update `AuthorizationAuditListener` to include `AuditEvent` data if
found.

Closes gh-6851
2016-09-09 12:48:30 -07:00
Phillip Webb 7396ccfe04 Harmonize ConditionOutcome messages
Add ConditionMessage class to help build condition messages in a
uniform format and update existing conditions to use it.

Fixes gh-6756
2016-09-07 10:50:39 -07:00
Phillip Webb 41dc53f5dd Polish 2016-09-07 08:34:45 -07:00
Johnny Lim 4b9f6869f0 Polish
Closes gh-6817
2016-09-05 09:08:08 +02:00
Stephane Nicoll b7da0bd301 Merge branch '1.3.x' 2016-09-05 09:00:52 +02:00
Vedran Pavic b88889f020 Polish `HealthEndpoint` javadoc
Closes gh-6815
2016-09-05 09:00:08 +02:00
Andy Wilkinson 3814e509a3 Polish @deprecated javadoc and link to replacements where available
Closes gh-6765
2016-08-31 14:34:49 +01:00
Andy Wilkinson 9874c22e23 Fix HAL browser endpoint redirect and entry point with custom servlet path
Previously, the HAL browser endpoint did not consider the dispatcher
servlet’s path (server.servlet-path) when redirecting to browser.html
or when updating the API entry point in the served HTML.

This commit moves to using ServletUriComponentsBuilder to build the URI
for the redirect and the path for the entry point. In the interests of
simplicity the logic that sometimes redirected and sometimes forwarded
the request has been changed so that it will always perform a redirect.

Closes gh-6586
2016-08-31 11:22:45 +01:00
Phillip Webb 565ad79856 Polish 2016-08-29 20:26:30 +01:00
Johnny Lim 524edaea51 Polish
Closes gh-6728
2016-08-23 15:13:33 +02:00
Andy Wilkinson 98d81110f2 Write management and main server access logs to separate files
Previously, when access logging was enabled and the management server
was running on a separate port, both the main server and the management
server would write their access logs to the same file. Having two
separate containers writing to the same file could cause problems such
as causing log rotation to break.

This commit updates the actuator so that when the management server is
running on a separate port (and therefore using a separate container)
it prepends management_ to the access log prefix so that the main
server and the management server write their access logs to separate
files in the same directory.

Closes gh-6618
2016-08-22 11:57:51 +01:00
Andy Wilkinson 13a9bc0537 Polish “Allow injection of StatsDClient into StatsdMetricWriter”
Closes gh-6588
2016-08-16 13:25:16 +01:00
Nick Pillitteri 63085fb441 Allow injection of StatsDClient into StatsdMetricWriter
Allow an instance of StatsDClient to be injected into the StatsdMetricWriter
which is used for exporting metrics to a Statsd server. This new constructor
allows the client to be injected but does not change the default behavior of
the writer.
2016-08-16 13:23:25 +01:00
Andy Wilkinson df4ef3e1cb Merge branch '1.3.x' 2016-08-15 13:47:32 +01:00
Andy Wilkinson ffc0dc44ed Make Flyway and Liquibase endpoints conditional on a single candidate
Previously, auto-configuration of the Flyway and Liquibase endpoints
would fail if there were multiple Flyway or Spring Liquibase beans
in the application context.

This commit updates them so that they are now conditional on a single
candidate.

Closes gh-6609
2016-08-15 13:43:03 +01:00
Stephane Nicoll 4882544c84 Polish contribution
Closes gh-6540
2016-08-13 08:02:04 +02:00
Eddú Meléndez dced154f71 Fix health endpoint security
Commit b02aba4 has renamed `management.security.role` to
`management.security.roles`. Unfortunately, the `HealthMvcEndpoint`
was still looking at the old property.

This commit makes sure that the proper key is used and any custom
role is applied rather than an unconditional `ADMIN` role.

See gh-6540
2016-08-13 07:26:41 +02:00
Phillip Webb a49f309ec1 Call afterProperties set in LogFileMvcEndpoint
Call afterPropertiesSet on the delegate `ResourceHttpRequestHandler`
to prevent an NPE. This change is required for compatibility with
Spring Framework 4.3 following SPR-13834.

Closes gh-6592
2016-08-11 16:11:29 +01:00
Andy Wilkinson 22ac6bcb2d Break GaugeWriter dependency cycle in MetricExportAutoConfiguration
Previously, MetricExportAutoConfiguration consumed
ExportMetricWriter-annotated GaugeWriter beans in its constructor and
also produced such a bean from one of its @Bean methods. This cycle
caused a BeanCurrentlyInCreationException to be thrown when the
bean method was active (the spring.metrics.export.statsd.host property
was set).

This commit break the cycle by moving the bean method into a separate,
nested configuration class. It also updates the existing test for
auto-configuration of a Statsd writer to catch any possible cycles
and to verify that the writer has be registered with the
MetricsExporter.

Closes gh-6544
2016-08-10 14:54:42 +01:00
Andy Wilkinson 19cddd650d Merge branch '1.3.x' 2016-08-08 17:25:15 +01:00
Andy Wilkinson cec6015f8a Cope with null server or management port when creating curie provider
Previously, a NullPointerException would occur if
endpoints.docs.curies.enabled was true and the default value was being
used for either server.port or management.port.

EndpointWebMvcHypermediaManagementContextConfiguration has been
restructured to ensure that the DocsMvcEndpoint bean is defined before
the condition on its existence is evaluated. Previously this was
dependant on the class’s bean methods being processed in a particular
ordering, something that would be ok when using ASM but would vary when
using reflection.

Closes gh-6584
2016-08-08 17:16:00 +01:00
Spring Buildmaster 334baaeffd Next development version 2016-07-28 19:54:01 +00:00
Spring Buildmaster a89ef5df6e Next Development Version 2016-07-28 09:18:40 +00:00
Phillip Webb ac1ad2a145 Polish 2016-07-27 16:27:11 -07:00
Johnny Lim 9627d0ed66 Polish
Closes gh-6487
2016-07-27 12:29:33 +01:00
Chad 18dd125059 Unescape quotation marks in JavaDoc
Closes gh-6482
2016-07-26 21:42:22 -07:00
Phillip Webb 496b3a8d75 Relocate FileWriters to `spring-boot`
Move ApplicationPidFileWriter and EmbeddedServerPortFileWriter to the
core spring-boot project since they're not really tied to the actuator.

Fixes gh-6398
2016-07-25 13:45:29 -07:00
Johnny Lim 68fe8a58b8 Align message with regex for AbstractMvcEndpoint.path
Closes gh-6437
2016-07-21 17:04:32 +01:00
Andy Wilkinson fe22609096 Test that temp file has been deleted before triggering heap dump
The MBean requires that a file does not exist at the location to which
it’s dumping the heap. This commit updates the test to ensure that the
temporary file that’s created to get a location for the heap dump file
is deleted before asking the MBean to dump the heap to that location.
2016-07-21 13:51:51 +01:00
Phillip Webb 05cde789e1 Reduce noise in /end actuator docs
Update the `/env` sample used in the actuator docs to use only a limited
set of keys.

Fixes gh-5849
2016-07-19 09:41:12 -07:00
Phillip Webb 05ff4ed4e0 Upgrade to Tomcat 8.5.4 & remove tomcat-juli
Upgrade the managed Tomcat dependency to 8.5.4 and remove `tomcat-juli`
since it's now included in `tomcat-embed-core`.

Fixes gh-6192
2016-07-18 17:52:35 -07:00
Phillip Webb e03e109874 Polish 2016-07-18 11:27:55 -07:00
Stephane Nicoll 7e6f4021de Polish contribution
Closes gh-6059
2016-07-18 08:54:27 +02:00
RichardCSantana 42bb843364 Fix Bug HealthIndicator for Redis Cluster
See gh-6059
2016-07-18 08:48:01 +02:00