Commit Graph

385 Commits

Author SHA1 Message Date
Dave Syer
171b2e452b Make ServerProperties bean conditional on being a webapp 2014-08-20 09:09:19 +01:00
Phillip Webb
fc7823bc42 Merge branch '1.1.x' 2014-08-18 17:55:21 -07:00
Phillip Webb
5c34b07742 Fix DefaultCounterService.reset
Fix DefaultCounterService.reset to call the reset method of the
underlying MetricWriter.

Fixes gh-1391
2014-08-18 17:28:23 -07:00
Phillip Webb
83bd36d8e0 Merge branch '1.1.x'
Conflicts:
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java
2014-08-18 13:02:44 -07:00
Phillip Webb
6e6bc25c44 Polish 2014-08-18 09:57:03 -07:00
Dave Syer
c556175381 Merge branch '1.1.x' 2014-08-13 08:15:59 -07:00
Dave Syer
2fae4afe95 Ensure status in ErrorPageFilter defaults to 200
Fixes gh-1369. Note that this is caused by the ErrorPageFilter, so
only a problem when deployed as a WAR.
2014-08-13 08:14:09 -07:00
Dave Syer
300910f7d5 Merge branch '1.1.x' 2014-08-11 17:43:14 -07:00
Dave Syer
0cf1c6f0e5 Refactor AuthenticationManagerConfiguration to make sure it works
if user also adds @EnableWebMvcSecurity. The problem is that the ordering
of the init() and configure() methods in the Spring Security configurers
can force things to happen too early unless we are careful. It's still a bit
twitchy I would say, but this relatively small change seems to fix the GS guide
and not break any existing tests.

I added a sample which mimic ths GS guide so we get an integration test that
executes the new code paths.

Fixes gh-1364
2014-08-11 17:42:30 -07:00
Phillip Webb
7d0a3ddcce Rename VanillaHealthIndicator to Application...
Rename `VanillaHealthIndicator` to `ApplicationHealthIndicator` and
changed the exposed bean name from `statusHealthIndicator` to
`applicationHealthIndicator`.

This provides less confusing JSON output:

  {"status":"UP","application":{"status":"UP"}}

vs:

  {"status":"UP","status":{"status":"UP"}}

Fixes gh-1291
2014-08-11 09:04:01 -07:00
Christian Dupuis
063f67da5f Maintain same structure in /health output
JSON output of /health now has the same structure for 1 or more HealthIndicators. This makes it easier to consume the response from scripts or apps

fixes #1291
2014-08-08 14:59:04 +02:00
Spring Buildmaster
74d0c5185a Next development version 2014-08-07 11:59:17 -07:00
Phillip Webb
7641f23f71 Merge branch '1.1.x' 2014-08-06 12:26:29 -07:00
Phillip Webb
d854c09d5a Add option to disable X-Application-Context
Add `management.add-application-context-header` option to disable
the automatic adding of the `X-Application-Context` HTTP header.

Fixes gh-1308
2014-08-06 12:25:38 -07:00
Phillip Webb
92899474ac Polish 2014-08-06 09:10:23 -07:00
Dave Syer
1e51c5db15 Merge branch '1.1.x' 2014-08-05 07:56:55 -07:00
Dave Syer
1259057acb Change unknownPath to unmapped 2014-08-05 07:56:02 -07:00
Taylor Wicksell
733b22f46a gh-1331 defaulting 404 response metrics to "unkownPath" when no matching handler can be found
Fixes gh-1331, Fixes gh-1333
2014-08-05 07:55:34 -07:00
Taylor Wicksell
c6f5961ad6 fix for gh-1331 MetricFilter now supports uri template variables when available 2014-08-04 17:19:16 -07:00
Phillip Webb
642224feff Support regex in keys-to-sanitize
Update EnvironmentEndpoint and ConfigurationPropertiesReportEndpoint
to allow regex patterns in `keys-to-sanitize`.

Fixes gh-1245
2014-07-29 15:13:45 -07:00
Phillip Webb
da5c36c3a9 Polish 2014-07-29 13:06:47 -07:00
Phillip Webb
14c6243637 Refactor PublicMetrics registration
Rework flexible PublicMetrics registration introduced in 2be6b3e4 to
restore compatibility with v1.1 VanillaPublicMetrics. The new
MetricReaderPublicMetrics class now exposes metrics from a MetricReader
and VanillaPublicMetrics is deprecated. The MetricsEndpoint can now
exposes a collection of PublicMetric interface directly.

See gh-1094
2014-07-29 12:31:40 -07:00
Andy Wilkinson
2abf3ebdc3 Merge branch '1.1.x' 2014-07-29 15:12:11 +01:00
Andy Wilkinson
333bc3e842 Avoid RS.getObject(index, Object.class) as it breaks MySQL on Java 7
Previously, when running on Java 7+, the JDBC query driven by
DataSourceHealthIndicator resulted in a call to
ResultSet.getObject(index, Object.class). When using MySQL's JDBC
driver this failed with an SQLException with the message "Conversion
not supported for type java.lang.Object". The problem does not occur
on Java 6 as the overload of getObject that takes a type does not
exist; ResultSet.getObject(index) is called instead and MySQL happily
returns whatever type it deems to be appropriate for the column.

This commit updates DataSourceHealthIndicator so that
ResultSet.getObject(index) will always be used, irrespective of the
version of Java that Boot is running on.

Closes #1306
2014-07-29 15:11:53 +01:00
Phillip Webb
53d24301d1 Merge branch '1.1.x' 2014-07-28 15:41:42 -07:00
Phillip Webb
f8bf0e2031 Polish 2014-07-28 15:40:40 -07:00
Christian Dupuis
68163a66a5 Change query in MongoHealthIndicator
This commit changes the query in MongoHealthIndicator from serverStatus to buildInfo to avoid unprivileged access and corresponding errors.

fixes #1289
2014-07-24 10:07:36 +02:00
Christian Dupuis
13ee41d04d Change query in MongoHealthIndicator
This commit changes the query in MongoHealthIndicator from serverStatus to buildInfo to avoid unprivileged access and corresponding errors.

fixes #1289
2014-07-24 10:06:40 +02:00
Christian Dupuis
99b3240ab2 Ensure custom HTTP code mappings for /health don't remove default mappings
Previously any custom http code mapping would remove the default mappings. With this commit the behaviour is changed so that default mappings will stay if a custom mapping is registered. Certainly a default mapping can be overridden.

fixes #1264
2014-07-21 17:06:41 +02:00
Christian Dupuis
977c5a988c Ensure custom HTTP code mappings for /health don't remove default mappings
Previously any custom http code mapping would remove the default mappings. With this commit the behaviour is changed so that default mappings will stay if a custom mapping is registered. Certainly a default mapping can be overridden.

fixes #1264
2014-07-21 16:11:47 +02:00
Christian Dupuis
2f28a1017c Polish and re-add author name 2014-07-18 12:37:02 +02:00
Stephane Nicoll
2be6b3e419 Flexible registration of additional PublicMetrics
This commit permits the use of several PublicMetrics instances by
default. Previously, only one PublicMetrics service could be specified
and a user configuration would remove all the defaulting.

VanillaPublicMetrics now takes a collection of PublicMetrics and
invokes them in sequence to build the final collection of metrics.
The system-related metrics have been moved to SystemPublicMetrics and
are registered by default.

Also updated the documentation to mention this feature and how it
could be fully overridden.

Fixes gh-1094
2014-07-17 16:19:05 +02:00
Christian Dupuis
99971a6578 Fix HTTP status code mapping in HealthMvcEndpoint
refs #1264
2014-07-17 16:12:06 +02:00
Stephane Nicoll
249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 2014-07-11 10:44:05 +02:00
Spring Buildmaster
40327e1ae6 Next development version 2014-07-08 02:33:36 -07:00
Phillip Webb
fa88c481a5 Remote trailing whitespace 2014-07-02 15:17:14 -07:00
Dave Syer
2a1ccfeade Allow /mappings to be disabled (fixes gh-1185) 2014-06-28 07:21:30 +01:00
Spring Buildmaster
981669b7c0 Next development version 2014-06-26 14:09:54 -07:00
Phillip Webb
200cd535c2 Revert "Next development version"
This reverts commit 67189477fe.
2014-06-26 11:03:09 -07:00
Spring Buildmaster
67189477fe Next development version 2014-06-26 10:51:35 -07:00
Phillip Webb
9632abf825 Formatting and cleanup 2014-06-26 09:41:15 -07:00
Dave Syer
123ffd736c Exclude @ManagedResources from Endpoint MBeans
If an Endpoint is already @ManagedResource then it doesn't need
an additional (probably wrong) MBEan registration based on the invoke()
method.
2014-06-26 16:11:56 +01:00
Phillip Webb
1f36d4657f Fix various Windows related issues
Fixes gh-1168
2014-06-25 14:31:41 -07:00
Spring Buildmaster
542f3cbda8 Next development version 2014-06-24 13:53:56 -07:00
Dave Syer
0d5c30fdcc Add instance.uptime to VanillaPublicMetrics 2014-06-24 15:16:49 +01:00
Christian Dupuis
b5d65bfc56 Delegate shell access decision to bean named "shellAccessDecisionManager"
In order to solve issues with multiple or incompatible AccessDecisionManagers, the CRaSH integration will now only delegate to an explicit shellAccessDecisionManager bean refs #1121
2014-06-20 13:58:52 +02:00
Christian Dupuis
edffabeee4 Make sure Spring related security beans for the shell are not installed if not wanted
refs #1121
2014-06-18 16:58:07 +02:00
Christian Dupuis
b439d3522e Fix VanillaHealthIndicator javadoc 2014-06-17 19:57:00 +02:00
Tobias Gesellchen
21846f3bc7 update javadoc and test method to reflect current implementation 2014-06-17 18:10:24 +02:00
Dave Syer
59e177d298 Default endpoints.jmx.domain to the spring.jmx.default_domain 2014-06-17 13:01:04 +01:00