Commit Graph

1656 Commits

Author SHA1 Message Date
Phillip Webb 6cdb02050d Reduce InMemoryAuditEventRepository default capacity
Lower the default capacity used in `InMemoryAuditEventRepository` from
4000 to 1000. This should help reduce memory consumption.

Fixes gh-9056
2017-05-01 22:31:39 -07:00
Stephane Nicoll f42998f5ca Revert "Refine validator and MVC validator configuration"
This commit reverts c9561f0 and 69a8c0d and effectivly fixes gh-8979 but
reintroduces the issue reported in gh-8495.
2017-04-28 11:12:09 +02:00
Madhura Bhave 6184e4154e Test correct binding in '/info' endpoint
Add a test to ensure that the updated configuration properties work
correctly binds environment sources in the `/info` endpoint.

Closes gh-7388
2017-04-27 14:34:29 -07:00
Madhura Bhave 866cf1dda7 Use new configuration properties in actuator
Update `spring-boot-actuator` to use the new configuration properties
support.

See gh-9000
2017-04-27 13:59:25 -07:00
Phillip Webb 45dd9f7144 Polish 2017-04-27 12:04:02 -07:00
Phillip Webb df82060cad Formatting 2017-04-27 10:12:31 -07:00
Stephane Nicoll 800eb010b1 Change the default JDBC connection pool to Hikari
Closes gh-6013
2017-04-27 16:11:45 +02:00
Vedran Pavic 720e801a76 Make Audit events MVC endpoint `after` parameter required
Closes gh-9002
2017-04-27 10:54:45 +02:00
Phillip Webb 06558675bb Polish 2017-04-25 09:45:14 -07:00
Madhura Bhave c2e5fd031a Replace usage of WebMvcConfigurerAdapter
Closes gh-8964
2017-04-24 15:31:39 -07:00
Spring Buildmaster 9768b0a8c2 Next Development Version 2017-04-21 08:32:01 +00:00
Phillip Webb 99a3ec8b74 Merge branch '1.5.x' 2017-04-20 16:01:58 -07:00
Phillip Webb 5f3d5fbec1 Remove public "skip path extension" constant
Remove the public constant to make it clearer that skipping path
extensions is really an internal Spring Boot concern.

See gh-8765
2017-04-20 13:31:04 -07:00
Spring Buildmaster d719d2cbbc Next Development Version 2017-04-20 12:46:19 +00:00
Phillip Webb 81fef71fcb Merge branch '1.5.x' 2017-04-19 22:48:46 -07:00
Phillip Webb c9561f031c Refine validator and MVC validator configuration
Update `ValidationAutoConfiguration` and `WebMvcAutoConfiguration` to
ensure as much as possible that only a single Validator bean of each
type is registered.

Validation auto-configuration now does the following:
- If no validator is found: Registers a `LocalValidatorFactoryBean`
  (providing both Spring and JSR validation)
- If the user defines a Spring & JSR validator: Backs off
- If the user defines only a JSR validator: Adapts it to a Spring
  validator (without exposing another JSR implementation)

WebMvcAutoConfiguration auto-configuration has been updated to make
MVC validation follow common Spring Boot patterns:
- If not validator beans are found (due to the user excluding
  ValidationAutoConfiguration) a new `mvcValidator` bean will be
  registered.
- If a single validator bean is found it will be used for MVC
  validation.
- If multiple validator beans are defined it will either use the one
  named `mvcValidator` or it will register a new `mvcValidator` bean

Any automatically registered `mvcValidator` bean will not implement
the JSR validator interface.

Finally, it is no longer possible to provide an MVC validator via a
`WebMvcConfigurer`.

Fixes gh-8495
2017-04-19 22:18:12 -07:00
Phillip Webb 9166bb5fae Polish 2017-04-19 12:00:36 -07:00
Phillip Webb 75f8e8a593 Fix actuator path used in tests
Fixup path changes that were missed during 1.5.x merge.
2017-04-19 11:58:07 -07:00
Phillip Webb 724be85b95 Polish 2017-04-19 11:57:48 -07:00
Stephane Nicoll b100caa041 Fix import 2017-04-19 11:18:57 +02:00
Phillip Webb 94209e2883 Merge branch '1.5.x' 2017-04-18 15:06:43 -07:00
Andy Wilkinson b9be0e3e0f Skip actuator path extension content negotiation
Allow `PathExtensionContentNegotiationStrategy` to be bypassed by
actuator endpoints. Prior to this commit calling `/loggers/com.aaa.cab`
would return a HTTP 406 response due to `.cab` being a known extension.

Fixes gh-8765
2017-04-18 14:56:11 -07:00
Phillip Webb 8eb79b3c0f Polish 2017-04-18 11:13:12 -07:00
Stephane Nicoll 56c68ca6cf Merge branch '1.5.x' 2017-04-18 10:43:08 +02:00
Stephane Nicoll 6c14420221 Merge branch '1.4.x' into 1.5.x 2017-04-18 10:42:48 +02:00
Stephane Nicoll 9a5346f29c Polish "Fix statsd metrics collection for names with ":""
Closes gh-8906
2017-04-18 10:40:14 +02:00
Odín del Río 9e705c83c8 Fix statsd metrics collection for names with ":"
Statsd server is ignoring malformed metrics. This change introduces
a basic sanitizing to metric names for avoid losing those metrics.

See gh-8906
2017-04-18 10:40:14 +02:00
Phillip Webb 383640d5ec Merge branch '1.5.x' 2017-04-17 22:15:33 -07:00
Phillip Webb f46d799f31 Polish 2017-04-17 22:08:51 -07:00
Madhura Bhave 757be57d48 Merge branch '1.5.x' 2017-04-17 15:25:27 -07:00
Madhura Bhave 3fe0b844a6 Make HealthMvcEndpoint conditional on missing bean 2017-04-17 14:49:45 -07:00
Madhura Bhave bcd79dd992 Move all actuators under `/application`
Context path can be configured via `management.context-path`.

Closes gh-6886
2017-04-14 15:15:44 -07:00
Stephane Nicoll b9d1f5e097 Harmonize Solr status health details
This commit renames the `solrStatus` property of the Solr health indicator
to `status` and its type. This is now an integer corresponding to the
status Solr sent rather than a String that can be "OK" when all is well.

Closes gh-8878
2017-04-13 18:40:47 +02:00
Phillip Webb c4cba6b0ea Merge branch '1.5.x' 2017-04-11 21:07:51 -07:00
Phillip Webb c97268981a Polish 2017-04-11 20:59:03 -07:00
Phillip Webb d301d0f4c3 Merge branch '1.4.x' into 1.5.x 2017-04-11 20:42:48 -07:00
Phillip Webb 758ddcd420 Polish 2017-04-11 20:17:23 -07:00
Madhura Bhave 971057705d Merge branch '1.5.x' 2017-04-11 15:57:10 -07:00
Madhura Bhave 535451f9e5 Merge branch '1.4.x' into 1.5.x 2017-04-11 15:54:01 -07:00
Madhura Bhave b2f0ebfcb8 Prevent empty json for parameters in trace endpoint
Fixes gh-8883
2017-04-11 15:30:39 -07:00
Stephane Nicoll bd28de09b0 Merge branch '1.5.x' 2017-04-11 15:30:18 +02:00
Stephane Nicoll eff35795cd Fix checkstyle violation 2017-04-11 15:29:52 +02:00
Stephane Nicoll 158b3dae16 Merge branch '1.5.x' 2017-04-11 14:57:19 +02:00
Stephane Nicoll b148b46751 Polish 2017-04-11 14:54:16 +02:00
Stephane Nicoll 2ef318c00d Polish "Add the ability to disable the trace filter"
Closes gh-8650
2017-04-11 14:46:57 +02:00
Colin Harrington d3e2e22f8c Add the ability to disable the trace filter
See gh-8650
2017-04-11 14:46:57 +02:00
Stephane Nicoll 82ac8b5ca1 Polish "Fix http status code with unknown log level"
Closes gh-8813
2017-04-11 13:29:53 +02:00
Eddú Meléndez cf08162148 Fix http status code with unknown log level
This commit changes the http status code to 400 when an unknown log level
is specified.

Closes gh-8798
See gh-8813
2017-04-11 13:23:41 +02:00
Stephane Nicoll 6399ed7869 Fix checkstyle rule 2017-04-10 14:20:50 +02:00
Stephane Nicoll 74be6ff0f1 Merge branch '1.5.x' 2017-04-10 13:41:04 +02:00
Stephane Nicoll a9b5e7c12a Merge branch '1.4.x' into 1.5.x 2017-04-10 13:38:27 +02:00
Stephane Nicoll 9d88e477f3 Fix Solr health indicator
This commit changes the solr health indicator to request the status of
all available cores, rather than invoking a generic ping on the admin
handler.

Recent versions of Solr now have a ping handler per core and the general
admin handler is gone, leading to incorrect health status. For backward
compatible reason the `solrStatus` attribute is kept to `OK` if all cores
are running properly (that's actually `0` behind the scenes).

Closes gh-8463
2017-04-10 13:38:08 +02:00
Andy Wilkinson 7a4b87be6b Merge branch '1.5.x' 2017-04-07 12:21:09 +01:00
Andy Wilkinson c74f0a70ca Merge branch '1.4.x' into 1.5.x 2017-04-07 12:14:47 +01:00
Andy Wilkinson 5dad7182db Address deprecation warnings 2017-04-07 12:01:01 +01:00
Vedran Pavic 2667b7f51c Upgrade to Hazelcast 3.8
Closes gh-8808
2017-04-05 14:21:00 +02:00
Phillip Webb 2de7e9c310 Merge branch '1.5.x' 2017-04-04 10:07:38 -07:00
Phillip Webb ad38776de3 Polish 2017-04-04 09:48:10 -07:00
Phillip Webb ddcb5ee328 Polish 2017-04-04 09:36:27 -07:00
Madhura Bhave 8bfd42e3f1 Add v2 content type to actuator endpoints
Closes gh-7968
2017-03-27 11:10:44 -07:00
dreis 5d85733378 Replace empty string concatenation with String.valueOf()
Closes gh-8686
2017-03-26 12:03:36 +02:00
Madhura Bhave 20f201b57a Flip default for management.add-application-context-header
Closes gh-8656
2017-03-24 16:21:29 -07:00
Madhura Bhave 6ad46db944 Merge branch '1.5.x' 2017-03-23 16:10:35 -07:00
Madhura Bhave cb38546d8a Document default trace includes
Closes gh-8654
2017-03-23 15:36:27 -07:00
Andy Wilkinson 87ebec6838 Upgrade to Jackson 2.9.0.pr2
As part of the upgrade, this commit removes the use of any API that
has been deprecated in 2.9. This includes the config props endpoint's
use of SerializationFeature.WRITE_NULL_MAP_VALUES. This has been
replaced with configuring serialization inclusion to only include
properties with non-null values. This means that all null-valued
properties will no longer be serialized, not just those that are an
entry in a map.

Closes gh-8604
Closes gh-8537
Closes gh-7695
2017-03-23 15:22:20 +00:00
Andy Wilkinson 937681af65 Avoid problem caused by new mime mappings in Framework snapshots 2017-03-22 15:25:32 +00:00
Madhura Bhave 52d992701d Merge branch '1.5.x' 2017-03-17 14:09:27 -07:00
Madhura Bhave 8ac22fc2fd Add elapsed time to the Trace Actuator output
Closes gh-8654
2017-03-17 12:04:55 -07:00
Phillip Webb 34de119eba Polish 2017-03-16 13:04:03 -07:00
Andy Wilkinson 1893fdab0d Revert "Upgrade to Jackson 2.9.0.pr1"
This reverts commit 10ae5e8f3f. Health
serialization fails with Jackson 2.9.0 (gh-7695).

See gh-8537
2017-03-15 17:01:12 +00:00
Andy Wilkinson 10ae5e8f3f Upgrade to Jackson 2.9.0.pr1
As part of the upgrade, this commit removes the use of any API that
has been deprecated in 2.9.0.pr1. This includes the config props
endpoint's use of SerializationFeature.WRITE_NULL_MAP_VALUES. This
has been replaced with configuring serialization inclusion to only
include properties with non-null values. This means that all
null-valued properties will no longer be serialized, not just those
that are an entry in a map.

Closes gh-8604
Closes gh-8537
2017-03-15 16:38:08 +00:00
Stephane Nicoll 1b395ddd9d Merge branch '1.5.x' 2017-03-15 08:57:42 +01:00
Stephane Nicoll cd8684499d Polish
See gh-8621
2017-03-15 08:57:24 +01:00
Phillip Webb b76ca0bf8f Restructure web auto-configuration
Restructure `org.springframework.boot.autoconfigure.web` to better align
with the new package structure in `spring-boot`.

Auto-configuration is now split into client, servlet and reactive
sub-packages. In addition a new `http` package now handles common
HTTP concerns.

Fixes gh-8616
2017-03-14 22:06:28 -07:00
Phillip Webb 099e188f9f Unify WebServerFactoryCustomizers
Replace `ReactiveWebServerCustomizer` and `WebServerFactoryCustomizer`
with a unified `WebServerFactoryCustomizer`.

Fixes gh-8558
2017-03-14 21:43:23 -07:00
Madhura Bhave bfae0d7739 Merge branch '1.5.x' 2017-03-14 13:37:09 -07:00
Madhura Bhave 0dcebdaf7c Merge branch '1.4.x' into 1.5.x 2017-03-14 13:34:41 -07:00
Madhura Bhave 19da8d8271 Fix UnsupportedOperationException
Fixes gh-8602
2017-03-14 11:59:42 -07:00
Phillip Webb 67556ba8ea Restructure embedded web server packages
Rework `org.springframework.boot.context.embedded` to relocate classes
to `org.springframework.boot.web`. Packages are now organized around
the following areas:

Packages for shared concerns, for example the `WebServer` interface
to start/stop a server and the common configuration elements:
- org.springframework.boot.web.context
- org.springframework.boot.web.server

Servlet specific packages:
- org.springframework.boot.web.servlet.server
- org.springframework.boot.web.servlet.context
- org.springframework.boot.web.servlet.filter

Reactive specific packages:
- org.springframework.boot.web.reactive.context
- org.springframework.boot.web.reactive.server

Embedded server implementations (both reactive and servlet):
- org.springframework.boot.web.embedded

In addition:

- Rename `EmbeddedServletContainerFactory` to `ServletWebServerFactory`
  to align with the `ReactiveWebServerFactory`.
- Rename `EmbeddedWebApplicationContext` to
  `ServletWebServerApplicationContext` and
- Rename `EmbeddedReactiveWebApplicationContext` to
  `ReactiveWebServerApplicationContext`.
- Add checkstyle rules to restrict imports.
- Fixup all affected code to use the correct imports and local names.

Fixes gh-8532
2017-03-12 21:08:25 -07:00
Madhura Bhave f72c5b70c6 Merge branch '1.5.x' 2017-03-08 11:57:24 -08:00
Madhura Bhave 7da70a52fd Mask sensitive placeholders in env endpoint
Closes gh-8282
2017-03-08 10:53:39 -08:00
Madhura Bhave 8f903987da Merge branch '1.5.x' 2017-03-07 11:08:59 -08:00
Madhura Bhave 703b7d9268 Merge branch '1.4.x' into 1.5.x 2017-03-07 11:08:06 -08:00
Madhura Bhave 67068fc83d Ignore unresolvable nested placeholders
The NamePatternEnvironmentFilter used to throw an exception if
placeholders in property values could not be resolved.

Fixes gh-8510
2017-03-07 10:20:42 -08:00
Phillip Webb 2136a39004 Fix checkstyle errors 2017-03-06 17:37:09 -08:00
Phillip Webb d8f827d224 Cleanup and format code 2017-03-06 17:08:09 -08:00
Phillip Webb 425dbc3e52 Update copyright header for edited files 2017-03-06 15:04:07 -08:00
Phillip Webb 2a592103f0 Polish formatting 2017-03-06 15:03:43 -08:00
Phillip Webb 91a7bf92e6 Merge branch '1.5.x' 2017-03-06 12:04:55 -08:00
Phillip Webb fedd7b9506 Polish 2017-03-06 12:01:05 -08:00
Spring Buildmaster d23fa24340 Next Development Version 2017-03-03 16:18:26 +00:00
Spring Buildmaster 2a83e80a9b Next Development Version 2017-03-03 14:39:21 +00:00
Madhura Bhave 8f26dc09b7 Merge branch '1.5.x' 2017-03-02 13:35:19 -08:00
Madhura Bhave d4b52a3538 Expose Health details if user has authority
If the Princial is a Spring Security Authentication object and the
request doesn't have the right roles, check the authorities.

Fixes gh-8471
2017-03-02 12:37:47 -08:00
Stephane Nicoll cb40ea485b Merge branch '1.5.x' 2017-03-02 14:31:49 +01:00
Stephane Nicoll 5cc569fc91 Improve execution speed of `CacheAutoConfigurationTests`
As of Hazelcast 3.7, the bootstrap is pretty slow by default due to the
networking discovery. This commit disables both TCP/IP and multicast
discoveries.
2017-03-02 14:28:33 +01:00
Phillip Webb 58ac67eb27 Merge branch '1.5.x' 2017-03-02 00:09:56 -08:00
Phillip Webb 3ee7dae09b Merge branch '1.4.x' into 1.5.x 2017-03-01 23:44:40 -08:00
Phillip Webb f1012c104a Polish 2017-03-01 23:29:20 -08:00
Phillip Webb c06a9771c2 Support list based role properties
Update `HealthMvcEndpoint` to respect `ManagementServerProperties`
roles. Prior to this commit the `HealthMvcEndpoint` directly loaded
roles rather than using bound properties. This meant that list values
from yaml were not respected.

Fixes gh-8314
2017-03-01 21:35:50 -08:00