Commit Graph

555 Commits

Author SHA1 Message Date
Johannes Stelzer 05e388012d Fix for empty datasource-name in metrics
If there is more than one DataSource and the non-primary bean-name is
'datasource' an incorrect metric name is chosen.

The metrics are named datasource.active and not datasource.xxx.active. To
avoid this, the shortening of the bean-name only occurs if the bean-name
is longer than 'datasource'.

See gh-2320
2015-02-13 09:31:31 +01:00
Andy Wilkinson a8726c4ae1 Merge branch '1.1.x' 2015-02-12 17:53:07 +00:00
Andy Wilkinson d7ae0f3b06 Ensure that management endpoints with nested paths are secured
Previously each endpoint was secured for path, path/, and path.*.
This meant that a request to path/foo was not secured. This commit
secures path/** to ensure that requests to a nested endpoint path are
also secured.

Fixes gh-2476
2015-02-12 17:50:38 +00:00
Phillip Webb 8e398dc6a7 Polish Javadoc
Update Javadoc to add missing @return and @param elements.
2015-02-03 11:35:06 -08:00
Phillip Webb c02b99b257 Rename CodahaleMetricWriter
Deprecate CodahaleMetricWriter and create DropwizardMetricWriter to
reflect the renamed project.

Fixes gh-2442
2015-02-02 22:19:06 -08:00
Phillip Webb 0696695e16 Add package javadoc 2015-02-02 17:05:38 -08:00
Phillip Webb ccdbfd274f Fix Java 8 Javadoc compatibility
Update Javadocs to fix errors caused by Java 8 aggressive linting.

Fixes gh-2233
2015-02-02 17:05:37 -08:00
Phillip Webb 3328c1369f Merge branch '1.1.x'
Conflicts:
	spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
2015-02-01 20:28:11 -08:00
Phillip Webb 555827cad7 Polish 2015-02-01 20:00:11 -08:00
Stephane Nicoll 763a735bd5 Merge branch '1.1.x'
Conflicts:
	spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportProperties.java
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java
2015-01-29 16:45:00 +01:00
Stephane Nicoll d64cc082db Harmonize property name
The property default format is lower case using hyphen. The JMX default
domain property has been harmonized to that format.

Fixes gh-2427
2015-01-29 16:42:24 +01:00
Stephane Nicoll f5f0952837 Merge branch '1.1.x' 2015-01-26 03:28:17 +01:00
Stephane Nicoll e70c18d05b Fix name of solr health indicator
Fixes gh-2410
2015-01-26 03:27:53 +01:00
Spring Buildmaster 60725cd8bd Next development version 2015-01-07 23:37:07 -08:00
Phillip Webb 44d81d43f6 Merge branch '1.1.x' 2015-01-06 12:00:41 -08:00
Phillip Webb bd83aca63f Fix InMemoryAuditEventRepository search by date
Update InMemoryAuditEventRepository to consider the date when searching
for events. Also switch to a circular buffer implementation and update
the capacity to limit the total number of items rather than limiting
per principal.

Fixes gh-2291
2015-01-06 11:58:28 -08:00
Phillip Webb 1f775793ee Use Collections.addAll(...) instead of for loops
Replace various for loops which add items to collections with calls
to Collections.addAll(...).

Fixes gh-2277
2015-01-04 11:49:06 -08:00
Mathieu Bernatet bf839e57a5 Fix global `endpoints.enabled` property support
Update AbstractEndpoint to correctly support the `endpoints.enabled`
property. Also fix EnvironmentEnpoint which would previously prevent
the Environment from being set.

Fixes gh-2264
Closes gh-2265
2014-12-31 19:05:25 -08:00
Stephane Nicoll 0a19fd0af0 Merge branch '1.1.x' 2014-12-28 10:52:16 +01:00
Stephane Nicoll 38594cd820 Remove unused code
Closes gh-2244
2014-12-28 10:51:53 +01:00
Dave Syer 94b06be683 Change bean name metricReporitory -> actuatorMetricRepository
Fixes gh-2189
2014-12-27 07:44:17 +00:00
Phillip Webb d7a12a8791 Remove superfluous semi-colons 2014-12-26 20:48:53 -08:00
Phillip Webb 0702b4e7e3 Merge branch '1.1.x'
Conflicts:
	spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfigurationTests.java
	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java
2014-12-26 11:48:13 -08:00
Phillip Webb 96d479c3d9 Make RequestMappingHandlerMapping @Primary
Update WebMvcAutoConfiguration so that the RequestMappingHandlerMapping
bean is @Primary. Prior to this commit a NoUniqueBeanDefinitionException
would be thrown then using the MvcUriComponentsBuilder.

Fixes gh-2237
2014-12-26 11:42:10 -08:00
izeye bff41358bf Remove unecessary semicolon 2014-12-26 11:11:01 +01:00
Phillip Webb 98135c964b Remove Principal handler logic from security
Update ManagementSecurityAutoConfiguration so that MVC Endpoints that
have Principal arguments are not treated in any special way. This
restores Spring Boot 1.1.x behavior where the 'sensitive' flag is used
to determine access rules.

The HealthMvcEndpoint still uses the Principal (when available) to
determine if full status information can be displayed. It now also
explicitly checks the environment for `endpoints.health.sensitive`
to determine if the user has opted-out and requires complete health
details.

The health MVC endpoint should now work as follows:

* Default configuration - No login is required, full information is only
  displayed if a Principal is available.
* endpoints.health.sensitive=true - Login is required, full information
  is displayed.
* endpoints.health.sensitive=false - Login is not required, full
  information is displayed.

Fixes gh-2211
2014-12-25 12:42:45 -08:00
Phillip Webb 8628adcb74 Order EmbeddedServletContainerCustomizers
Add Ordered interface to all EmbeddedServletContainerCustomizers with
a value of 0. Prior to this commit it was difficult for a user to
define a customizer that would be applied before ours, even if they
implemented Ordered or added @Order annotations.

Fixes gh-2123
2014-12-22 22:04:08 -08:00
izeye 3784959b6f Rename SecurityPrequisite -> SecurityPrerequisite
Closes gh-2179
2014-12-17 15:58:59 -08:00
Alex Panchenko 8f869e6be3 Remove duplicate "should" word from README 2014-12-17 13:30:09 +01:00
Phillip Webb 9f31e09cf0 Fix 'pid' references in the PortFileWriter
Fix numerous copy-paste errors in EmbeddedServerPortFileWriter
where PID concepts are referenced.

Fixes gh-2161
2014-12-15 12:28:39 -08:00
Phillip Webb 5dd40e6999 Polish 2014-12-12 16:33:44 -08:00
Stephane Nicoll 11f5c76968 Properly guard ManagementSecurityAutoConfiguration
ManagementSecurityAutoConfiguration fully relies on the presence of a
web environment, yet the configuration class itself was not guarded by
`@ConditionalOnWebApplication` (while nested config where).

This turned out to be a problem for command-line applications using
spring security (i.e. CRaSH integration).

Fixes gh-2112
2014-12-12 16:15:38 +01:00
Stephane Nicoll e96f75fdc1 Fix management endpoint without Spring Security
The method 'injectIntoSecurityFilter' added In 3c1e48c assumes that
Spring security is in the classpath so any management endpoints that are
deployed on a different port requires Spring Security all the sudden.

This commit separates the creating of the EndpointHandlerMapping in two
mutually exclusive @Configuration: one that is triggered if Spring
Security is not in the classpath and one that is triggered if Spring
Security is in the classpath. The latter apply the security filter in the
endpoint mapping if it exists.

Fixes gh-2124
2014-12-12 11:53:26 +01:00
Stephane Nicoll f8141cbb95 Restore use of management.health.*.enabled keys
The move of health.* keys to management.health.* broke them as they
are not defined as configuration keys and `ManagementServerProperties`
is strict on the whole management namespace.

This commit updates the tests to actually include that properties class
and relax the "ignoreUnknownFields" condition so that extra attributes
can be defined on the "management" namespace.

Fixes gh-2115
2014-12-11 15:30:44 +01:00
Spring Buildmaster 63e6a25097 Next development version 2014-12-10 18:06:30 -08:00
Spring Buildmaster 1a788c1741 Next development version 2014-12-10 16:35:50 -08:00
Phillip Webb c678c1f788 Polish 2014-12-10 13:23:26 -08:00
Phillip Webb a27217ae43 Provide a way to opt-in to endpoint enablement
Update AbstractEndpoint so that the `enable` property is optional and
when it not specified the `endpoints.enabled` property will be used.

This allows users to switch the way that endpoints are enabled. Rather
than opting-out specific endpoint enablement the `endpoints.enabled`
property can be set to `false` and specific endpoints can be opted-in.

Fixes gh-2102
2014-12-10 12:39:34 -08:00
Dave Syer de3ce18ad6 Defensive check for cglib proxy in RequestMappingEndpoint
Since AbstractHandlerMethodMapping.getHandlerMap() is final it can't
be cglibbed and a proxy will barf if you try and call that method.
The RequestMappingEndpoint can be protected simply by defensively
checking if the mapping is a proxy before trying to inspect it.
2014-12-10 10:49:01 +00:00
Phillip Webb b63922d59d Polish 2014-12-10 00:34:54 -08:00
Stephane Nicoll d33c0ebf8f Fix data type of telnet and ssh ports
Define shell.ssh.port and shell.telnet.port as integer properties
so that the generated meta-data exposes the proper type.

Fixes gh-2076
2014-12-08 17:25:50 -08:00
Phillip Webb 4b7c6f61b4 Polish 2014-12-08 13:37:39 -08:00
Phillip Webb fc746b802a Polish 2014-12-08 08:48:55 -08:00
Stephane Nicoll f40f17a758 Add missing description 2014-12-08 14:44:48 +01:00
Phillip Webb d7c61ef01c Drop ShellProperties.setAdditionalProperties
Drop the setAdditionalProperties method from ShellProperties to ensure
that it is not included in the meta-data JSON. The additional properties
are usually wired in using @Autowired and it is pretty unlikely that
anyone is using the setter directly.

Fixes gh-2055
2014-12-03 10:23:14 -08:00
Dave Syer 0b19884f58 Remove unecessary reflection hacks 2014-12-03 15:11:17 +00:00
Phillip Webb 4c7cc58a19 Correct ApplicationPidFileWriter property javadoc
Fixes gh-2041
2014-12-02 17:40:41 -08:00
Dave Syer 9de82f9c69 Add some space between the trace filter and the end of the chain 2014-12-02 11:14:03 +00:00
Phillip Webb 09dac5ff00 Apply formatting and cleanup rules 2014-12-01 19:35:03 -08:00
Phillip Webb 48db5457f1 Polish 2014-12-01 19:32:05 -08:00