Commit Graph

277 Commits

Author SHA1 Message Date
Phillip Webb 30ac768cbf Remove @ControllerAdvice from BasicErrorController
Update the BasicErrorController so that it no longer needs to implement
@ControllerAdvice or have an @ExceptionHandler method.

A new ErrorAttributes interface is now used to obtain error details,
the DefaultErrorAttributes implementation uses a
HandlerExceptionResolver to obtain root exception details if the
`javax.servlet.error.*` attributes are missing.

This change also removes the need for the extract(...) method on
ErrorController as classes such as WebRequestTraceFilter can
now use the ErrorAttributes interface directly.

See gh-839, gh-538
Fixes gh-843
2014-05-12 19:46:57 +01:00
Andy Wilkinson fec136e213 Merge branch '1.0.x'
Conflicts:
	spring-boot-dependencies/pom.xml
2014-05-12 10:37:06 +01:00
Andy Wilkinson f761daf253 Upgrade to CRaSH 1.3.0-beta18
Closes #841
2014-05-12 10:35:20 +01:00
Lukasz Kryger e7484c66f5 Registering PID file to be deleted on JVM exit 2014-05-11 09:21:19 -07:00
Phillip Webb bd38893f55 Rename rabbitHealthIndicator bean
Rename the rabbitHealthIndicator bean which was accidentally named
redisHealthIndicator.
2014-05-10 22:34:18 +01:00
Christian Dupuis a62bc9ca60 Polish 2014-05-10 11:15:31 +02:00
Christian Dupuis b026b13c66 Add HealthIndicator for Rabbit 2014-05-10 11:12:04 +02:00
Phillip Webb 1acffdf649 Polish 2014-05-09 08:52:11 +01:00
Christian Dupuis 51dddc2dc4 Add gc information to /metrics endpoint 2014-05-08 17:10:37 +02:00
Christian Dupuis dfd6f91aef Merge pull request #819 from cdupuis/health-indicator
Rework HealthIndicator support
2014-05-08 16:40:44 +02:00
Christian Dupuis 288e7a5d92 Rename missing test 2014-05-08 16:32:50 +02:00
Christian Dupuis 916a85c615 Rename SimpleHealthIndicator to SimpleDataSourceHealthIndicator 2014-05-08 16:20:50 +02:00
Christian Dupuis eeaa96725f Rename SimpleHealthIndicator to SimpleDataSourceHealthIndicator 2014-05-08 16:20:22 +02:00
Christian Dupuis c5ec735afb Add unit test for (Mongo|Redis)HealthIndicator 2014-05-08 15:56:29 +02:00
Dave Syer 14d3b46809 Add constants to SecurityProperties and ManagementServerProperties
For the convenience of users who want to selectively override the
access rules in an application without taking complete control of the
security configuration we now have some constants:

* SecurityProperties.ACCESS_OVERRIDE_ORDER for overriding just the
application endpoint access rules

* ManagementServerProperties.ACCESS_OVERRIDE_ORDER for overriding the
application endpoint and management endpoint access rules

Fixes gh-803
2014-05-08 05:32:43 -07:00
Christian Dupuis 127328a833 Rework HealthEndpoint and HealthIndicators
Refactored HealthEndpoint to be able to take multiple HealthIndicators. Extracted configuration of HealthIndicators out of EndpointAutoConfiguration and added new HealthIndicatorAutoConfiguration class.

Added HealthIndicators for Redis and Mongo.
2014-05-08 12:37:37 +02:00
Christian Dupuis 126fedc14a Add support for disabling crash commands
fixes #587 and #588
2014-05-06 13:32:29 +02:00
Stephane Nicoll 33082fd56d Harmonized maven dependency management
This commit harmonizes the dependency management of internal modules
so that versions can be omitted everywhere. Update the maven coordinates
to provide the full groupId for consistency
2014-05-05 14:29:01 +01:00
Phillip Webb dd7391d07e Add missing @Since tag 2014-05-05 11:45:34 +01:00
Tyler Frederick 43bd42f0f5 Add multi-datasource health indicator support
Update EndpointAutoConfiguration to support multiple datasources.

Fixes gh-783
2014-05-05 11:36:55 +01:00
Tyler Frederick 697afe3842 Add CompositeHealthIndicator
Add CompositeHealthIndicator that allows multiple HealthIndicators
to be combined into a single result.

Fixes gh-782
2014-05-05 11:24:11 +01:00
Stephane Nicoll e26e06d5dd Fix build
Two modules are still relying on the spring-boot test-jar but it was
not generated anymore. Adding the generation of test-jar again as
a workaround until we completely removes the use of it.
2014-04-30 16:39:54 +02:00
Christian Dupuis a66fc3030e Add more runtime metrics like information about heap, class loading and threads to the metrics infrastructure 2014-04-30 15:22:56 +02:00
Dave Syer ef4e83a879 Move ErrorController to autoconfig 2014-04-29 15:23:29 +01:00
Dave Syer 27580e726f Add generic error handling to BasicErrorController
Since Spring supports gobal error handling through
@ControllerAdvice, it is quite easy to set up more meta-data
about an exception for the BasicErrorController. You need
to be careful not to swallow Security exceptions, and probably
others (optionally) so this feature needs a bit more work.

See gh-538
2014-04-29 15:23:28 +01:00
Andy Wilkinson b6cd2c970c Use Jedis rather than Lettuce as preferred Redis client
Salvatore has indicated that Jedis is his Java Redis client of choice.
This commit updates the auto-configuration support, actuator and
Redis starter accordingly.

Completes #745
2014-04-28 14:06:40 +01:00
sopov.ivan 174b654faf minor test fixes
Reverting arguments in assertEquals where constant was placed on
the "actual" place. Replacing assertEquals with assertFalse, assertTrue
and assertNull where applicable.

Fixes gh-735
2014-04-26 14:14:05 +01:00
Phillip Webb 64a835e91a Move master to 1.1.0.BUILD-SNAPSHOT 2014-04-24 12:45:20 +01:00
Spring Buildmaster d3954a1703 Next development version 2014-04-24 02:24:28 -07:00
Phillip Webb 4119ef5cf4 Use random ports for tests
Update remaining tests to use random ports.

Fixes gh-337
2014-04-23 19:11:54 +01:00
Phillip Webb f847ed2b1f Remove getEmbeddedServletContainers()
Remove the mutable getEmbeddedServletContainers() Map from
EmbeddedWebApplicationContext and instead use the `namespace` to
distinguish the management container.

The ServerPortInfoApplicationContextInitializer class replaces the
previous TestExecutionListener to exposes port properties (by
listening for EmbeddedServletContainerInitializedEvents).
2014-04-23 15:41:56 +01:00
Phillip Webb fad5ce45db Polish 2014-04-23 12:35:33 +01:00
Phillip Webb 316cb87583 Create ApplicationPid and remove SystemUtils
Create a new ApplicationPid class to remove the need for SystemUtils
and refactor existing calls.
2014-04-23 12:00:36 +01:00
Dave Syer b291332cd4 Use CountDownLatch instead of Thread.sleep()
... to wait for ApplicationContext to close in the 3 tests
that we needed to do so.

Fixes gh-664
2014-04-23 10:14:38 +01:00
Dave Syer 00b85e8c42 Ensure path starts with "/" in ErrorController
When mapping the ErrorController path to Spring Security it's
important that it starts with "/". This change ensures that is
the case even if the user has omitted the leading "/".

Fixes gh-694
2014-04-19 19:21:45 -07:00
Dave Syer 7b07fe8ce0 Convert remaining samples to use random port
Partial fix for gh-337. See also gh-607 which complements this, but might
conflict on a merge.
2014-04-17 20:29:04 -07:00
Dave Syer f134e96053 Convert Actuator sample to dynamic ports 2014-04-17 17:36:09 -07:00
Dave Syer 41cdb7b48d Add parent directory creation
Also tidied a few other things up (like not needing
SmartApplicationListener).

Fixes gh-550
2014-04-11 06:33:03 +01:00
Jakub Kubrynski f6488c7f66 Now after starting application PID file will be created
Fixes gh-550
2014-04-10 16:30:36 +01:00
Dave Syer 708d5ade9f Fix path stripper in JolokiaEndpoint to account for management.contextPath
When the user sets management.contextPath=/admin the Jolokia
endpoint gets mapped to /admin/jolokia, but that the path stripper it uses
internally makes a false assumption about the form of the request path.
The fix is simple (just use a smarter search for the endpoint path in the
request path).

Fixes gh-642
2014-04-08 09:58:17 +01:00
Spring Buildmaster a5864ebcd0 Next development version 2014-04-06 22:43:18 -07:00
Dave Syer 72d7c286c0 Add Spring MVC-generated path suffixes to endpoint paths
Spring Security doesn't know that Spring MVC maps /foo, /foo.json
and /foo/ all to the same handler. This change explicitly adds
suffixes to the actuator endpoint matchers so they are properly
protected.
2014-04-03 14:03:09 +01:00
Spring Buildmaster 15e9dbe98b Next development version 2014-04-01 03:05:51 -07:00
Phillip Webb 1e68b7e0a9 Remove superfluous <packaging> tags from POMs 2014-04-01 02:07:43 -07:00
Phillip Webb 0af7f7e347 Add missing POM info 2014-04-01 02:07:42 -07:00
Phillip Webb 488b03387f Polish POM formatting 2014-04-01 02:07:36 -07:00
Phillip Webb 6f9bb233ad Revert "Next development version"
This reverts commit b67bb70ee3.
2014-04-01 00:38:48 -07:00
Spring Buildmaster b67bb70ee3 Next development version 2014-03-31 22:38:42 -07:00
Dave Syer 499f54893b Add @Conditionals to switch off non-generic endpoints
Fixes gh-601
2014-03-31 17:33:39 -07:00
Phillip Webb ac4cdd33c3 Revert "Next development version"
This reverts commit 1d0eea12eb.
Returning to 1.0.0.BUILD-SNAPSHOT for an updated release.
2014-03-31 17:14:30 -07:00