Commit Graph

1191 Commits (318701daa7e55a8a1429924673f3bb15cc3662f6)

Author SHA1 Message Date
Stephane Nicoll 2c71cb8efd Polish 8 years ago
Stephane Nicoll 4407194c00 Replace sample by integration test
Closes gh-3888
8 years ago
Phillip Webb 6a2ac080ac Create our own SessionCreationPolicy enum
Update `ManagementServerProperties` so that `security.sessions` no
longer uses `SessionCreationPolicy` from Spring Security. We now
use our own enun which allows `management.security.*` properties to
be set without the risk of a `ClassNotFoundException`.

Fixes gh-3888
8 years ago
Andy Wilkinson 97e5e32496 Make sure the MetricsFilter uses committed response's status
Previously, if an exception was thrown during request handling after
the response had been committed, i.e. after the status and headers
had been written, the metrics filter would assume that it was a 500
response. This was potentially inaccurate as the status had already
been sent to the client and before the exception was thrown and it
may have been something other than a 500.

This commit updates MetricsFilter so that it will use the
status from the response if the response has been committed even when
an exception is thrown.

Closes gh-7277
8 years ago
Andy Wilkinson b191974faa Reflect Java 7/8 differences in javadoc for metric repository auto-config
Closes gh-6985
8 years ago
Phillip Webb 60355e0e11 Fix ResourceHttpRequestHandler delegate
Fix ResourceHttpRequestHandler to set the ServletContext following the
Spring Framework update for SPR-14851.
8 years ago
Stephane Nicoll 6d50e26b70 Polish contribution
Closes gh-7215
8 years ago
Johnny Lim eb7c0e4dc8 Remove unused
Closes gh-6966
8 years ago
Phillip Webb 3326841a97 Formatting 8 years ago
Phillip Webb 39ed0d4dfb Polish 8 years ago
Stephane Nicoll 8c1b736bb0 Fix list property to be mutable
Closes gh-7068
8 years ago
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 8 years ago
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
8 years ago
Phillip Webb 825dd0a26c Merge branch '1.3.x' 8 years ago
Phillip Webb 3172d434a7 Polish
Closes gh-6835
8 years ago
Phillip Webb c56f30fd91 Formatting 8 years ago
Stephane Nicoll c662986628 Merge branch '1.3.x' 8 years ago
Stephane Nicoll 6eb0449aa9 Use BDD mockito
See gh-6869
8 years ago
Stephane Nicoll d87d60f746 Merge branch '1.3.x' 8 years ago
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
8 years ago
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
8 years ago
Vedran Pavic d87bec11fb Include AuditEvent details in AuditListener
Update `AuthorizationAuditListener` to include `AuditEvent` data if
found.

Closes gh-6851
8 years ago
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
8 years ago
Phillip Webb 41dc53f5dd Polish 8 years ago
Johnny Lim 4b9f6869f0 Polish
Closes gh-6817
8 years ago
Stephane Nicoll b7da0bd301 Merge branch '1.3.x' 8 years ago
Vedran Pavic b88889f020 Polish `HealthEndpoint` javadoc
Closes gh-6815
8 years ago
Andy Wilkinson 3814e509a3 Polish @deprecated javadoc and link to replacements where available
Closes gh-6765
8 years ago
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
8 years ago
Phillip Webb 565ad79856 Polish 8 years ago
Johnny Lim 524edaea51 Polish
Closes gh-6728
8 years ago
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
8 years ago
Andy Wilkinson 13a9bc0537 Polish “Allow injection of StatsDClient into StatsdMetricWriter”
Closes gh-6588
8 years ago
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.
8 years ago
Andy Wilkinson df4ef3e1cb Merge branch '1.3.x' 8 years ago
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
8 years ago
Stephane Nicoll 4882544c84 Polish contribution
Closes gh-6540
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
Andy Wilkinson 19cddd650d Merge branch '1.3.x' 8 years ago
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
8 years ago
Spring Buildmaster 334baaeffd Next development version 8 years ago
Spring Buildmaster a89ef5df6e Next Development Version 8 years ago
Phillip Webb ac1ad2a145 Polish 8 years ago
Johnny Lim 9627d0ed66 Polish
Closes gh-6487
8 years ago
Chad 18dd125059 Unescape quotation marks in JavaDoc
Closes gh-6482
8 years ago
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
8 years ago
Johnny Lim 68fe8a58b8 Align message with regex for AbstractMvcEndpoint.path
Closes gh-6437
8 years ago
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.
8 years ago