Commit Graph

313 Commits

Author SHA1 Message Date
Phillip Webb eaa3bd040d Apply eclipse formatting rules 2014-09-04 09:39:58 -07:00
Mattias Severson 04c3e9979f Fix typo
Fixes gh-1463
2014-08-28 11:13:33 -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 6e6bc25c44 Polish 2014-08-18 09:57:03 -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 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 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 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
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 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 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
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
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
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
Stephane Nicoll b646231327 Properly close context hierarchy in tests
Prior to this commit, some tests were creating a parent/child
relationship but were only closing the child context. This could
be an issue with the autoconfig module as a lot of auto-config
kicks in by default.

This commit adds a new test utility designed to properly handle
those situations. Updated tests that were creating a context
hierarchy to benefit from that.

Fixes gh-1034
2014-06-17 10:58:33 +01:00
Phillip Webb 24471bc51e Polish 2014-06-16 12:39:15 -07:00
Dave Syer 9cc6bff177 Increase priority of EndpointHandlerMapping
The Actuator endpoints ought to take precedence over others (since
they are important and users can isolate them using management.contextPath
if necessary). This change puts the @Order at -100 (well before the default
order of the RequestMappingHandlerMapping at 0).

Fixes gh-1107
2014-06-16 17:26:54 +01:00
Dave Syer 3378ede231 Ensure CompositePropertySources are listed in EnvironmentEndpoint 2014-06-16 14:45:06 +01:00
Dave Syer 1bf256dd58 Ensure Weblogic and Websphere JMX are covered
To ensure an MBeanServer is available when needed you have to
look in JNDI before resorting to the JDK platform factory.

I had to copy some private code from Spring, but it seems
worth it.

Fixes gh-1092
2014-06-13 11:27:41 +01:00
Phillip Webb b5d267ca89 Polish 2014-06-09 12:33:49 -07:00
Christian Dupuis 5d25588d7b Make properties to sanitize configurable in EnvironmentEndpoint.
Add "key" to default keys that will be sanitized. fixes #1027
2014-06-09 15:07:36 +02:00
Dave Syer aa30fdba18 Add MBeanServer @Bean in case it is needed
Anywhere that an MBeanServer is needed it should be
created @Conditionally, so that user can exclude the
JmxAutoConfiguration and still get the other JMX
behaviours automatically.
2014-06-09 10:21:49 +01:00
Phillip Webb e891aa3525 Polish 2014-06-06 22:58:43 -07:00
Dave Syer 09200361de Align expectations of various JMX configurations
They all want to create an MBeanServer and when that happens
user sees no MBeans, or sometimes just one set (Spring Core,
Spring Integration or Spring Boot). To harmonise them we
create a @Bean of type MBeanServer and link to it in the
other autoconfigs

Fixes gh-1046
2014-06-06 17:52:14 +01:00
Andy Wilkinson c0c3c78f8d Add missing entries to the tables of auto-configuration classes
Closes #998
2014-06-04 12:53:33 +01:00
Andy Wilkinson 9b44c322d4 Update dependencies to latest maintenance releases
Despite Javassist 3.18.2-GA being available, it has not be upgraded.
This is to keep it in sync with Hibernate.
2014-06-03 17:03:26 +01:00
Dave Syer b31295246c Make WebRequestTraceFilter once per request 2014-06-01 09:47:23 +01:00
Dave Syer 5e3cc95ccf Adjust security.basic.enabled=false behaviour
Actually the web-secure sample is misusing
security.basic.enabled=false (IMO) - it should be a flag
to say that you want to temporarily disable the basic security
fallback on application endpoins, not  way to disable all
security autoconfiguration.

Added test case to web-secure sample to ensure a user
can log in.

Fixes gh-979
2014-05-29 13:25:01 +01:00
Phillip Webb a91e85b848 Add local.management.port when on same port
Add a `local.management.port` alias when the management server is
running on the same port as the main server.

Fixes gh-952
2014-05-27 21:25:33 +01:00
Phillip Webb 91bd78047e Rename TraceWebFilterAutoConfigurationTest
Rename TraceWebFilterAutoConfigurationTest to
TraceWebFilterAutoConfigurationTests
2014-05-27 21:25:33 +01:00
Christian Dupuis 057e149846 Introduce Health.Builder to clean up HealthIndicator implementations 2014-05-27 20:44:54 +02:00
Dave Syer 68448a8c68 Use the ServerProperties to add prefixes to paths
when server.servletPath is set we need to add prefixes to
the security filter paths.

Fixes gh-945
2014-05-24 08:33:14 +01:00
Phillip Webb 96a0d672af Rename SimpleDataSourceHealthIndicator
Rename SimpleDataSourceHealthIndicator to DataSourceHealthIndicator.
2014-05-23 10:58:40 +01:00
Phillip Webb aa03d9a41c Make Health and Status immutable
Update Health and Status objects to be immutable, update the existing
builder methods to return new instances and add static convenience
methods to Health.
2014-05-23 10:58:40 +01:00
Eric Dahl 3457cc4f39 Fix multiple typos in documentation, as well as "thread.deamon" typo in actuator 2014-05-22 21:18:08 -05:00
Christian Dupuis 297d14f5f8 Polish 2014-05-22 22:44:45 +02:00
Phillip Webb 1a475102de Polish 2014-05-22 20:33:08 +01:00
Andy Wilkinson d8e783f856 Update SolrHealthIndicator to extend AbstractHealthIndicator 2014-05-22 19:51:33 +01:00
Christian Dupuis db74d27ea0 Extract AbstractHealthIndicator
to make it more simple to implement HealthIndicator
2014-05-22 19:06:15 +02:00