Commit Graph

1172 Commits

Author SHA1 Message Date
Andy Wilkinson 8605499a64 Provide more control over when the health endpoint shows details
Closes gh-11869
2018-02-07 09:51:19 +00:00
Andy Wilkinson 1975d51106 Add support for injecting a Principal into web endpoint operations
Closes gh-11941
2018-02-07 09:51:10 +00:00
Phillip Webb d8de8752ea Change metrics exporters to auto-configurations
Refactor `*ExportConfiguration` classes to be regular auto-configuration
classes.

Also removed the `@ConditionalOnProperty` guards for `.enabled` properties
since auto-configuration can now be excluded in the usual way. Enabled
properties remain where applicable and are adapted for Micrometer to use
as it sees fit.

Fixes gh-11838
2018-02-06 17:42:14 -08:00
Phillip Webb 7ea6af0e46 Make AbstractApplicationContextRunner public
Fixes gh-11929
2018-02-06 13:28:18 -08:00
Phillip Webb a631619f63 Allow subpath H2 console matching
Fixes gh-11926
2018-02-06 13:25:17 -08:00
Phillip Webb 20ec7a6b52 Polish 2018-02-06 13:22:55 -08:00
Phillip Webb 6889ad59b8 Support property based MeterFilters
Add per-meter property support for `enabled`, `percentiles-histogram`,
`percentiles` and `sla`.

Fixes gh-11800
2018-02-06 13:21:27 -08:00
Andy Wilkinson 7d561f5ed0 Polish "Align with Micrometer's standardized cache metrics"
Closes gh-11918
2018-02-06 11:13:37 +00:00
Jon Schneider ba52aa3674 Align with Micrometer's standardized cache metrics
See gh-11918
2018-02-06 11:12:58 +00:00
Andy Wilkinson 8b15bbf702 Polish 2018-02-05 16:12:23 +00:00
Andy Wilkinson 76ed52c2f5 Polish "Support nested jar paths in loader.path"
Closes gh-11121
2018-02-05 16:06:07 +00:00
hanyong 9eb8e3d4e3 Support nested jar paths in loader.path
See gh-11121
2018-02-05 16:04:03 +00:00
Andy Wilkinson 886f782b20 Merge branch '1.5.x' 2018-02-05 11:04:48 +00:00
Phillip Webb eab1705351 Restore EmbeddedLdapAutoConfiguration condition
Restore a `@Condition` guard to `EmbeddedLdapAutoConfiguration`.

See gh-11764
2018-02-04 19:39:55 -08:00
Phillip Webb eab0b84a80 Polish 'Add support for multi baseDn;
Update multi baseDn support to use the recently introduced
`@Delimter` annotation

Closes gh-11764
2018-02-04 10:43:26 -08:00
Eddú Meléndez 270dc2cd72 Add support for multi baseDn
Update LDAP properties and auto-configuration to support multiple
base DN values.

See gh-11764
2018-02-04 10:41:57 -08:00
Eddú Meléndez 44ad630de3 Migrate LDAP tests to use ApplicationContextRunner 2018-02-04 10:41:23 -08:00
Madhura Bhave d0a2613241 Document CF actuator limitation if context-path changes
Closes gh-9081
2018-02-03 13:32:30 -08:00
Phillip Webb b5c4ce230d Ensure full commit id is always available
Update `GitProperties` so that the `commit.id` entry is also copied to
`commit.id.full`.

Prior to this commit, when returning full details, the value of
`commit.id` would be replaced with a `Map` containing only `abbriv` as
a key. By  copying the value to a sub-key we ensure that it remains
available both in the FULL and SIMPLE modes.

Fixes gh-11892
2018-02-02 19:00:35 -08:00
Phillip Webb 16b7dbf487 Only use Map converter binding when no descendants
Update `MapBinder` to only attempt conversion based binding when there
are no know descendant elements.

See gh-11892
2018-02-02 19:00:35 -08:00
Phillip Webb d6ae4e48d8 Add support for @Delimiter binding
Add a new `@Delimiter` annotation that can be used to change how a
String value is bound to a Collection.

Fixes gh-11883
2018-02-02 19:00:34 -08:00
Phillip Webb f24c92c658 Workaround ResolvableType.forClassWithGenerics bug
Temporarily work around SPR-16456
2018-02-02 18:59:06 -08:00
Phillip Webb 60d525e732 Polish IndexedElementsBinder 2018-02-02 18:59:06 -08:00
Phillip Webb 69234f8c08 Polish 2018-02-02 18:59:05 -08:00
Andy Wilkinson 2cc7325017 Polish 2018-02-02 20:51:14 +00:00
Madhura Bhave 49a72b007b Bind to map with numeric key without needing []
Closes gh-10751
2018-02-02 09:48:04 -08:00
Andy Wilkinson cebe6579d1 Merge branch '1.5.x' 2018-02-02 15:01:35 +00:00
Lukas Eder 44cd3352a5 Detect jOOQ SQLDialect through jOOQ's JDBCUtils
This change updates SqlDialectLookup to delegate to jOOQ's JDBCUtils
rather than creating an additional mapping between
org.springframework.boot.jdbc.DatabaseDriver and org.jooq.SQLDialect.

This has the following advantages:

1. jOOQ's `SQLDialect` to URL mappings are already maintained by jOOQ,
   so no additional changes will be necessary to Spring Boot in the
   future.
2. Delegating to jOOQ means that the mapping also works for the
   commercial jOOQ distributions, e.g. when working with DB2, Oracle,
   SQL Server, etc., as the JDBCUtils of the commercial distribution
   also contains the relevant logic to map to e.g. `SQLDialect.DB2`,
   `SQLDialect.ORACLE`, `SQLDialect.SQLSERVER` (which are not
   available from the open source distribution linked by Spring Boot
   by default).

Closes gh-11466
2018-02-02 13:02:36 +00:00
dreis2211 81459efffa Use HTTPS URLs where applicable 2018-02-02 12:03:12 +00:00
Andy Wilkinson 00489c74ea Start building against Spring Data Kay SR4 snapshots
The fix in Spring Data Redis for sentinel configuration means that
two Jedis sentinel tests now attempt to connect to a Sentinel. As a
result the tests fail. Running a Redis Sentinel in a Docker container
appears to be non-trivial. As an alternative, this commit updates the
tests to capture the JedisConnectionFactory prior to its
initialization (which is the failure trigger) and then assert that its
configuration is as expected.

See gh-11884
Closes gh-11855
2018-02-02 11:12:37 +00:00
Andy Wilkinson 9a87424809 Use ApplicationContextRunner in RedisAutoConfigurationJedisTests 2018-02-02 11:12:22 +00:00
Andy Wilkinson 8a123d3289 Polish 2018-02-02 09:41:11 +00:00
Andy Wilkinson 875091ed85 Polish “Remove or use unused method parameters”
Closes gh-11812
2018-02-02 09:34:19 +00:00
igor-suhorukov 717bd2c580 Remove or use unused method parameters 2018-02-02 09:34:19 +00:00
Phillip Webb c1c0385dbc Refine encodepassword options
Refine the options to include 'default'. Also no longer add
the prefix to all results.

Closes gh-11875
2018-02-02 01:04:52 -08:00
Phillip Webb eb83b2e0c2 Fix DataSourceHealthIndicator test failure
Fix failure introduced in commit 8af02ce05b.

See gh-11880
2018-02-01 20:30:08 -08:00
Phillip Webb 8af02ce05b Allow custom AbstractHealthIndicator warning logs
Update `AbstractHealthIndicator` so that the warning message can be
customized. Also updated our existing indicators with better messages.

Fixes gh-11880
2018-02-01 17:00:27 -08:00
Phillip Webb c3ec316890 Move Application* and *FileWriter classes
Move `ApplicationHome`, `ApplicationPid` and `ApplicationTemp` to the
`system` package. Since `system` package is now much lower level, the
existing `FileWriter` implementations also needed to move to prevent
package tangles.

Fixes gh-8614
2018-02-01 16:44:42 -08:00
Phillip Webb 3ff772957b Add WebServerApplicationContext abstraction
Add a new `WebServerApplicationContext` interface that provides a common
abstraction for all application contexts that create and manage the
lifecycle of an embedded `WebServer`.

Allows server namespaces to become a first-class concept (rather
subverting `ConfigurableWebApplicationContext.getNamespace()`) and
allow us to drop `getServerId()` from `WebServerInitializedEvent`.

Also helps to improve `ManagementContextAutoConfiguration` and
`ManagementContextFactory`.

Fixes gh-11881
2018-02-01 16:38:15 -08:00
Phillip Webb c8257b38a2 Add algorithm prefix to encoded password
Update the CLI encodepassword command to also include the algorithm
prefix.

Closes gh-11875
2018-02-01 13:06:25 -08:00
Phillip Webb 1e3bae9ba2 Third attempt to fix polish commit 2018-02-01 13:02:57 -08:00
Phillip Webb 706aa7af59 Make getInitializers() a protected method
Update `SpringBootContextLoader` so that `getInitializers()` is now a
protected method for subclasses to override if necessary.

Closes gh-11457
2018-02-01 12:24:11 -08:00
Phillip Webb b50b9afd26 Add `encodepassword` command to the CLI
Update the CLI so that `encodepassword <password>` can be used to
generate an encoded password.

Fixes gh-11875
2018-02-01 12:11:12 -08:00
Andy Wilkinson 4a1bea1fed Polish 2018-02-01 20:03:02 +00:00
Phillip Webb 84438183e1 Fix compile error due to previous polish 2018-02-01 12:01:43 -08:00
Phillip Webb 7d5e41f7dc Polish 2018-02-01 10:25:33 -08:00
Phillip Webb 00d9dbe4ce Start building against micrometer snapshots
See gh-11877
2018-02-01 10:25:26 -08:00
Madhura Bhave 84fafe1db0 Illustrate that endpoint expose & exclude take a list
Closes gh-11861
2018-02-01 09:37:04 -08:00
Madhura Bhave 3a7d5953a8 Fix typo 2018-02-01 09:29:20 -08:00
Andy Wilkinson 458dde63a8 Explicitly order AbstractTestExecutionListener subclasses
By default, AbstractTestExecutionListeners have an order of lowest
precedence. This means that it is impossible to write a listener with
lower precedence that any listener that's using the default order.

This commit updates Boot's 6 AbstractTestExecutionListeners to order
them explicitly. MockitoTestExecutionListener performs injection of
Mockito mocks and spies into the test instance. It now has an order of
2050 giving it slightly lower precedence than the dependency injection
test execution listener (2000).

The remaining 5 listeners have all been ordered with lowest precedence
- 100. This leaves them near their current lowest precedence position
while creating some room for any listeners that require lower
precedence.

Closes gh-11796
2018-02-01 14:28:25 +00:00