Commit Graph

787 Commits

Author SHA1 Message Date
Stephane Nicoll c25c07dfdd Remove dead code
ConfigurationPropertiesReportEndpoint parses the meta-data to inspect
entities that have potential cycles in them. The whole logic is based on
the lookup of `META-INF/spring-configuration-metadata.json` files on the
classpath. Unfortunately, the lookup instruction had a typo and did not
retrieve any file.

Surely that code was written with a clear intention in mind but it was
effectively dead code outside tests so it has been removed.

Closes gh-3310
2015-08-05 09:53:51 +02:00
Stephane Nicoll 7c9f2ae19c Polish
See gh-3555
2015-08-05 03:53:13 +02:00
Arthur Kalimullin b7b6e84d4b Add firebird specific health query
Closes gh-3555
2015-08-05 03:53:03 +02:00
Stephane Nicoll bf0b857357 polish 2015-08-04 10:56:23 +02:00
Phillip Webb 891dd5a0f6 Polish 2015-08-03 11:03:48 -07:00
Stephane Nicoll b569918db1 Add property to disable default health indicators
Add a "management.health.defaults.enabled" property that controls whether
the default health indicators are enabled. This allow to disable them all
by default and still enable individual ones using their respective
specific property.

Closes gh-2298
2015-08-03 14:26:12 +02:00
Stephane Nicoll d3e15805b4 Polish 2015-08-03 09:31:26 +02:00
Dave Syer 6d2af95d59 Allow path with / in JolokiaMvcEndpoint
See gh-3629
2015-07-31 15:35:52 +01:00
Dave Syer ff7717932a Weed out duplicate links if there are 2 endpoints with the same path
Fixes gh-3570
2015-07-31 14:55:46 +01:00
arghya88 6e71af2d21 Fix copyright date
Closes gh-3632
2015-07-31 10:19:46 +02:00
Stephane Nicoll 4a327dc08b Add missing meta-data
Closes gh-3620
2015-07-30 10:39:51 +02:00
Stephane Nicoll a90970060d Polish 2015-07-30 09:40:25 +02:00
Stephane Nicoll e32efc179c Polish 2015-07-30 09:39:51 +02:00
Stephane Nicoll 41bc3b386e Rename ManagementSecurityAutoConfiguration
Since `ManagementSecurityAutoConfiguration` is cnfiguring web-related
things, it has been renamed to `ManagementWebSecurityAutoConfiguration`.

Closes gh-2163
2015-07-28 15:20:59 +02:00
Stephane Nicoll 42e230192f Polish 2015-07-24 07:19:53 +02:00
izeye cb0c6843d2 Remove default paths in HAL and Links endpoints as value varies
The default values of fields in @ConfigurationProperties classes are,
where possible, included in the configuration metadata. The default
values for the HAL and Links endpoints vary depending on other
configuration settings. As a result, including a default in the
metadata is misleading.

This commit removes the default assignment of "" to the path fields so
that no default value will be included in the metadata.

Closes gh-3567
2015-07-23 10:32:25 +01:00
Stephane Nicoll 16dac01886 Polish 2015-07-22 15:18:23 +02:00
Phillip Webb 5d74ea2861 Merge branch '1.2.x' 2015-07-20 10:05:17 -07:00
Phillip Webb d2d71934b6 Polish 2015-07-20 10:04:28 -07:00
Stephane Nicoll 3e26273013 Polish 2015-07-20 15:38:42 +02:00
Stephane Nicoll 43c5151ee1 Merge branch '1.2.x' 2015-07-20 10:57:09 +02:00
Stephane Nicoll 539b009d12 Clean management context path if necessary
Various areas of the code expect the management's context path to not
contain any trailing slash but nothing is enforcing it. We now make sure
to remove any trailing slash, including the one for '/' and make that
explicit via the Javadoc of the getter.

Fixes gh-3553
2015-07-20 10:56:52 +02:00
Phillip Webb 728e64b929 Polish 2015-07-16 12:56:49 -07:00
Andy Wilkinson bedf2edffa Update auto-configuration @Bean methods to return most specific type
Closes gh-2536
Closes gh-2403
2015-07-15 19:00:56 +01:00
Stephane Nicoll f2d32d3e98 Add support for property deprecation
Previously, an item could only have a 'deprecated' boolean flag to
indicate that the property is deprecated. It is desirable to provide an
additional description for the deprecation as well as the name of the
property to use instead.

The `deprecated` boolean flag is now supported. Instead, a `deprecated`
object can be specified with two optional attributes: `reason` to provide
an explanation for the deprecation and `replacement` to refer to the
property that should be used instead. If none of them is present, an
empty deprecation object should be set.

For backward compatibility, the `deprecated` field is still set.

Deprecation information can only set via manual meta-data.

Closes gh-3449
2015-07-15 15:41:52 +02:00
Dave Syer de95012635 Workaround problems with order of endpoint handler mapping
When Spring Data REST is owning the home page it has its own
HandlerMapping with a fix (relatively) low priority. The /links
endpoint wants to own the home page as well, and our handler mapping
has a high priority for good reasons. This change addresses the
issue by checking if Spring Data REST is configured and if
the management context path (or  more specifically, the links
endpoint) is the same as the home page.

Fixes gh-3486
2015-07-15 11:45:25 +01:00
Phillip Webb fd6024ebf1 Move and refactor Redis test server @Rule
Move the Redis JUnit @Rule so that it can be used with
SessionAutoConfigurationTests. Also refactored the internals a little.
2015-07-13 11:52:42 -07:00
Phillip Webb 9ebe15232e Polish 2015-07-13 11:05:46 -07:00
Phillip Webb 6fdcdd888b Merge branch '1.2.x' 2015-07-13 10:18:40 -07:00
Phillip Webb dc18d8d1bb Formatting 2015-07-13 10:17:53 -07:00
Dave Syer e5d3fa0c6c Merge remote-tracking branch '1.2.x' 2015-07-13 15:43:40 +01:00
izeye d06f3b1a25 Fix typo
Closes gh-3473
2015-07-13 14:59:15 +02:00
Dave Syer d0cf6b534b Add 3xx redirects to the "unmapped" class of requests for metrics
When Spring Security sends 302 responses to a login page we don't get
any information about the request matching in Spring MVC. Consequently
apps can end up with a lot of counter.status.302.* metrics (where
"*" can be whatever the user sent).

This change treats 3xx the same as 4xx (if it is unmapped it just gets
added to a metric called "unmapped" instead of using the actual request
path).

Fixes gh-2563
2015-07-13 13:33:30 +01:00
Dave Syer 82da28f627 Add support for custom Exporter with declarative schedule 2015-07-13 10:11:33 +01:00
Andy Wilkinson 58509ed7c5 Merge branch '1.2.x' 2015-07-13 09:59:27 +01:00
Johannes Stelzer fdb83ec338 Correct assertion for indicators parameter in CompositeHealthIndicator
Closes gh-3417
2015-07-13 09:58:33 +01:00
Phillip Webb 67f7079cb2 Formatting 2015-07-09 10:18:05 -07:00
Stephane Nicoll 97634e85ac Remove unnecessary keyword 2015-07-09 14:33:01 +02:00
Phillip Webb 5938c967a3 Polish 2015-07-08 14:10:05 -07:00
Dave Syer 7ceb7ce6f6 Add send count to Integration metrics
Fixed gh-3364
2015-07-08 16:13:17 +01:00
Dave Syer 94e41b4190 Fix assertion in broken test 2015-07-08 16:03:25 +01:00
Dave Syer 7410eee34f Add custom condition for /logfile endpoint
Fixes gh-3360
2015-07-08 15:59:05 +01:00
Dave Syer c71196b92d Better segregation of export and redis keys 2015-07-08 15:52:50 +01:00
Stephane Nicoll 54619bec3f Clarify javadoc
This might just be me but when I read the original javadoc it made me
think that caching worked only if the endpoint is accessed anonymously.
2015-07-08 15:05:50 +02:00
Phillip Webb 7dcb79b3b3 Support more lenient DB2 product lookups
Update DataSourceHealthIndicator to support pattern based matching for
DB2 products. Prior to this commit product identifiers of the form
`DB2/LINUXX8664` were not supported.

Fixes gh-3377
2015-07-07 23:18:21 -07:00
Phillip Webb 85535f0882 Disable DB migrations in ApplicationHierarchyTests 2015-07-07 22:17:10 -07:00
Eddú Meléndez 3995c16ba6 Add 'flyway' and 'liquibase' actuator endpoints
Add `/flyway` and `/liquibase` actuator endpoints to provide details of
any database migrations that have been applied.

Fixes gh-3434
Closes gh-3435
2015-07-07 18:58:18 -07:00
Phillip Webb 7e58483ead Add serialization endpoint tests
Test basic serialization in Endpoint tests to ensure that JSON
can always be produced.
2015-07-07 18:31:43 -07:00
Phillip Webb 9b78f5d52e Replace @ConditionalOnExpression conditions
Replace @ConditionalOnExpression usage in auto-configuration in favor
of faster direct Environment access.
2015-07-07 16:27:30 -07:00
Phillip Webb 71dbec381a Create @ManagementContextConfiguration annotation
Replace the previously used `EndpointWebMvcConfiguration`
`spring.factories` key with a dedicated ManagementContextConfiguration
annotation.

Also renamed the EndpointWebMvcHypermediaConfiguration and
EndpointWebMvcConfiguration classes to make it clearer that they are
for the management context.

See gh-3345
2015-07-07 15:17:11 -07:00