Commit Graph

1493 Commits (d66496787d9ffce7cbf1309b0ab4072e6c74b453)

Author SHA1 Message Date
Madhura Bhave 7136bed126 Fix tests 7 years ago
Madhura Bhave 0a446cb962 Refactor Spring Security auto-configuration classes
The auto-configuration for a `UserDetailsService` and the web bits
has been split into two.

Closes gh-11915
Fixes gh-11891
7 years ago
Madhura Bhave 761bcffc13 Consider generic information on @Bean method for bind
Fixes gh-11931
7 years ago
Madhura Bhave dd3bcc5691 Polish 7 years ago
Madhura Bhave 7d53c54364 Fallback to Object.class if ResolvableType can't resolve
Fixes gh-11908
7 years ago
Andy Wilkinson efc3f888da Avoid exception throw-catch for non-MatchableHandlerMapping mappings
Closes gh-11912
7 years ago
Andy Wilkinson b3ed46af5a Polish 7 years ago
Andy Wilkinson 9a456924e4 Remove - from path-match and content-negotiation properties
Closes gh-11913
7 years ago
Michael J. Simons 97a97f3784 Polish 7 years ago
Andy Wilkinson deb94e7ff7 Upgrade to Flyway 5.0.7
Closes gh-11946
7 years ago
Andy Wilkinson c66aba8c35 Upgrade to Rxjava2 2.1.9
Closes gh-11945
7 years ago
Andy Wilkinson f18ee926a0 Upgrade to Rxjava 1.3.5
Closes gh-11944
7 years ago
Andy Wilkinson b42de610b9 Polish 7 years ago
Andy Wilkinson 5e8d533279 Add dependency management for javax.xml.bind:jaxb-api
Closes gh-11205
7 years ago
dreis2211 7108a1fc49 Optimize ApplicationHome.isUnitTest()
Closes gh-11910
7 years ago
Stephane Nicoll 63d2e944ba Polish "Add influx property to govern whether db is auto-created or not"
Closes gh-11922
7 years ago
Jon Schneider 9b215df4e9 Add influx property to govern whether db is auto-created or not 7 years ago
Andy Wilkinson 43285fb77c Document that WRITE_DATES_AS_TIMESTAMPS is disabled by default
Closes gh-11898
7 years ago
Andy Wilkinson 8229733f0d Avoid triggering early init when creating MeterRegistryPostProceesor
Closes gh-11890
7 years ago
Andy Wilkinson f19e0258d6 Upgrade to Hibernate 5.2.13.Final
Closes gh-11238
7 years ago
Andy Wilkinson 04083e7571 Link to Gradle plugin docs rather than duplicating build info example
Closes gh-11933
7 years ago
Andy Wilkinson 8605499a64 Provide more control over when the health endpoint shows details
Closes gh-11869
7 years ago
Andy Wilkinson 1975d51106 Add support for injecting a Principal into web endpoint operations
Closes gh-11941
7 years ago
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
7 years ago
Phillip Webb 7ea6af0e46 Make AbstractApplicationContextRunner public
Fixes gh-11929
7 years ago
Phillip Webb a631619f63 Allow subpath H2 console matching
Fixes gh-11926
7 years ago
Phillip Webb 20ec7a6b52 Polish 7 years ago
Phillip Webb 6889ad59b8 Support property based MeterFilters
Add per-meter property support for `enabled`, `percentiles-histogram`,
`percentiles` and `sla`.

Fixes gh-11800
7 years ago
Andy Wilkinson 7d561f5ed0 Polish "Align with Micrometer's standardized cache metrics"
Closes gh-11918
7 years ago
Jon Schneider ba52aa3674 Align with Micrometer's standardized cache metrics
See gh-11918
7 years ago
Andy Wilkinson 8b15bbf702 Polish 7 years ago
Andy Wilkinson 76ed52c2f5 Polish "Support nested jar paths in loader.path"
Closes gh-11121
7 years ago
hanyong 9eb8e3d4e3 Support nested jar paths in loader.path
See gh-11121
7 years ago
Andy Wilkinson 886f782b20 Merge branch '1.5.x' 7 years ago
Phillip Webb eab1705351 Restore EmbeddedLdapAutoConfiguration condition
Restore a `@Condition` guard to `EmbeddedLdapAutoConfiguration`.

See gh-11764
7 years ago
Phillip Webb eab0b84a80 Polish 'Add support for multi baseDn;
Update multi baseDn support to use the recently introduced
`@Delimter` annotation

Closes gh-11764
7 years ago
Eddú Meléndez 270dc2cd72 Add support for multi baseDn
Update LDAP properties and auto-configuration to support multiple
base DN values.

See gh-11764
7 years ago
Eddú Meléndez 44ad630de3 Migrate LDAP tests to use ApplicationContextRunner 7 years ago
Madhura Bhave d0a2613241 Document CF actuator limitation if context-path changes
Closes gh-9081
7 years ago
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
7 years ago
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
7 years ago
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
7 years ago
Phillip Webb f24c92c658 Workaround ResolvableType.forClassWithGenerics bug
Temporarily work around SPR-16456
7 years ago
Phillip Webb 60d525e732 Polish IndexedElementsBinder 7 years ago
Phillip Webb 69234f8c08 Polish 7 years ago
Andy Wilkinson 2cc7325017 Polish 7 years ago
Madhura Bhave 49a72b007b Bind to map with numeric key without needing []
Closes gh-10751
7 years ago
Andy Wilkinson cebe6579d1 Merge branch '1.5.x' 7 years ago
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
7 years ago
dreis2211 81459efffa Use HTTPS URLs where applicable 7 years ago
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
7 years ago
Andy Wilkinson 9a87424809 Use ApplicationContextRunner in RedisAutoConfigurationJedisTests 7 years ago
Andy Wilkinson 8a123d3289 Polish 7 years ago
Andy Wilkinson 875091ed85 Polish “Remove or use unused method parameters”
Closes gh-11812
7 years ago
igor-suhorukov 717bd2c580 Remove or use unused method parameters 7 years ago
Phillip Webb c1c0385dbc Refine encodepassword options
Refine the options to include 'default'. Also no longer add
the prefix to all results.

Closes gh-11875
7 years ago
Phillip Webb eb83b2e0c2 Fix DataSourceHealthIndicator test failure
Fix failure introduced in commit 8af02ce05b.

See gh-11880
7 years ago
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
7 years ago
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
7 years ago
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
7 years ago
Phillip Webb c8257b38a2 Add algorithm prefix to encoded password
Update the CLI encodepassword command to also include the algorithm
prefix.

Closes gh-11875
7 years ago
Phillip Webb 1e3bae9ba2 Third attempt to fix polish commit 7 years ago
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
7 years ago
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
7 years ago
Andy Wilkinson 4a1bea1fed Polish 7 years ago
Phillip Webb 84438183e1 Fix compile error due to previous polish 7 years ago
Phillip Webb 7d5e41f7dc Polish 7 years ago
Phillip Webb 00d9dbe4ce Start building against micrometer snapshots
See gh-11877
7 years ago
Madhura Bhave 84fafe1db0 Illustrate that endpoint expose & exclude take a list
Closes gh-11861
7 years ago
Madhura Bhave 3a7d5953a8 Fix typo 7 years ago
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
7 years ago
Andy Wilkinson 1d2b85b2b8 Ensure that TestJarFile uses insertion order for jar's entries
Previously, the order of the entries in a TestJarFile was determined
by the underlying file system rather than by the order in which
they were added. This could lead to unpredicatable ordering and
failures in tests that verify archive entry ordering.

This commit updates TestJarFile to add entries to the archive in
insertion order.

See gh-11695
See gh-11696
7 years ago
Andy Wilkinson cafe6dbbb1 Suppress debug log output during Logback initialization
Closes gh-11761
7 years ago
Andy Wilkinson e954bbbb86 Upgrade to Jackson 2.9.4
Closes gh-11830
7 years ago
Andy Wilkinson b2dad7f1c4 Rework entry ordering of repackaged archives
Previously, the Repackager would write entries in the following
order:

- Libraries that require unpacking
- Existing entries
    - Application classes
    - WEB-INF/lib jars in a war
- Libraries that do not require unpacking
- Loader classes

Libraries that require unpacking were written before existing entries
so that, when repackaging a war, an entry in WEB-INF/lib would not
get in first and prevent a library with same location from being
unpacked. However, this had the unwanted side-effect of changing
the classpath order when an entry requires unpacking.

This commit reworks the handling of existing entries and libraries
that require unpacking so that existing entries can be written first
while also marking any that match a library that requires unpacking
as requiring unpacking.

Additionally, loader classes are now written first. They are the
first classes in the jar that will be used so it seems to make sense
for them to appear first. This aligns Maven-based repackaging
with the Gradle plugin's behaviour and with the structure documented
in the reference documentation's "The Executable Jar Format" appendix.

The net result of the changes described above is that entries are
now written in the following order:

- Loader classes
- Existing entries
    - Application classes
    - WEB-INF/lib jars in a war marked for unpacking if needed
- Libraries

Closes gh-11695
Closes gh-11696
7 years ago
dreis2211 3e84f5bdbe Remove obsolete comment
Closes gh-11874
7 years ago
Johnny Lim 3cead7693d Polish
Closes gh-11871
7 years ago
Madhura Bhave 71e9db012b Convert tests to use ApplicationContextRunner 7 years ago
Madhura Bhave 905666e797 Document usage of `AuthenticationEventPublisher`
Closes gh-11420
7 years ago
Andy Wilkinson a6bb48a2f4 Remove remaining references to no longer supported container versions
Closes gh-11504
7 years ago
Andy Wilkinson 4179ed5a35 Start building against Spring Security 5.0.2 snapshots
See gh-11870
7 years ago
Andy Wilkinson 7e629cb4ba Remove dependency management for Javassist
Closes gh-11225
7 years ago
Andy Wilkinson fa0e536a1c Merge pull request #11866 from Tony Findeisen
* gh-11866:
  Add dependency management for remaining REST Assured modules
  Add dependency management for io.rest-assured:spring-mock-mvc
7 years ago
Stephane Nicoll c1ad9b73ba Allow caching for an Endpoint operation with optional arguments
This commit makes sure that caching is enabled if an operation has
nullable parameters and the actual invocation provides null values.

Closes gh-11795
7 years ago
Andy Wilkinson 518d0ead1a Add dependency management for remaining REST Assured modules
Close gh-11866
7 years ago
Tony Findeisen 85e6954e6b Add dependency management for io.rest-assured:spring-mock-mvc
See gh-11866
7 years ago
Andy Wilkinson de11fa6279 Replace references to jcl-over-slf4j with details of spring-jcl
Closes gh-10138
7 years ago
Stephane Nicoll 9d6cc3be46 Polish 7 years ago
Andy Wilkinson 8f116f7e6f Align ordering of BootJar and BootWar archive entries
Previously, the ordering of the entries in an archive produced by
BootJar was different to the ordering of the entries in an archive
produced by BootWar. The latter placed application classes before
any nested jars, whereas the former was the other way around.

This commit updates BootJar to use the same ordering as BootWar and
adds tests to verify that the ordering is the following:

1. Loader classes
2. Application classes (BOOT-INF/classes or WEB-INF/classes)
3. Nested jars (BOOT-INF/lib or WEB-INF/lib)
4. Provided nested jars in a war (WEB-INF/lib-provided)

The tests also verify that the position of a library is not affected
by it requiring unpacking.

See gh-11695
See gh-11696
7 years ago
Phillip Webb 6328de9e20 Add Madhura as a document author 7 years ago
Phillip Webb 7c5042d079 Don't run `apply-plugin` tests
Stop running apply-plugin tests as part of the build since during a
release the version number will change and the jar will not be
available.

Fixes gh-11857
7 years ago
Jon Schneider 09181d6b16 Fix CompositeMeterRegistryPostProcessor autowire
Update `CompositeMeterRegistryPostProcessor` to use constructor
autowiring for `Clock` detection.

Fixes gh-11856
7 years ago
Phillip Webb 6dddceacad Always include plugin classpath in sample gradle
Update a couple of the `spring-boot-gradle-plugin` sample gradle flies
so that they include the running classpath. The additional lines are
contained within a tag which is ultimately filtered from the final
documentation.

Fixes gh-11857
7 years ago
Phillip Webb faffea5dff Revert "Use Spring Session BOM in dependency management"
This reverts commit e5fb9c565c.
7 years ago
Phillip Webb 886b39293c Merge branch '1.5.x' 7 years ago
Phillip Webb 187c4d728c Merge branch '1.5.x' 7 years ago
Andy Wilkinson 42135cd5fc Polish "Aggregate max statistics in metrics endpoint with Double#max"
Closes gh-11852
7 years ago
Jon Schneider 92287f75f7 Aggregate max statistics in metrics endpoint with Double#max
See gh-11852
7 years ago
Vedran Pavic e5fb9c565c Use Spring Session BOM in dependency management
Closes gh-11815
7 years ago
Andy Wilkinson 6c10ca02b8 Revert "Upgrade to Jackson 2.9.4"
This reverts commit d908d0e876.

See gh-11830
7 years ago
Stephane Nicoll f7bf79c9b3 Polish deprecated metadata 7 years ago
Stephane Nicoll 51c307f643 Merge branch '1.5.x' 7 years ago
Stephane Nicoll 86c1fe529d Polish 7 years ago
Stephane Nicoll 1106c582a7 Remove error-level metadata for Spring Mobile
While Spring Mobile support has been removed from Spring Boot, the
auto-configuration has been relocated to a separate module that uses
the same keys.

Flagging those keys as deprecated means that the IDE will be confused
when the extra jar is present on the classpath as it advertizes, as
it should, support fo them.

Closes gh-11844
7 years ago
Stephane Nicoll 8b3c2b01e3 Fix broken replacement ids 7 years ago
Stephane Nicoll 2d814e5102 Restore "Reason: " prefix 7 years ago
Stephane Nicoll 3291a7a76d Polish 7 years ago
Stephane Nicoll 726a1d075e Polish metadata for spring.flyway.sql-migration-suffix 7 years ago
Andy Wilkinson 356efaa7c8 Rename trace to httptrace
Closes gh-11806
7 years ago
Stephane Nicoll 87c82310cf Merge branch '1.5.x' 7 years ago
Stephane Nicoll 1bf5768b28 Revert "Use Spring Session BOM in dependency management"
This commit reverts df28ee7
7 years ago
Jon Schneider 2612b43179 Restrict maximum URI tags to prevent memory issues
Add MeterFilter to restrict the maximum number of web client URI tags
created. Prior to this commit, if a user was manually building URIs for
use with a RestTemplate (rather than using uriVariables) the JVM could
run out of memory.

Fixes gh-11338

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
7 years ago
Phillip Webb 8f23ee4e58 Apply micrometer MeterFilter beans automatically
Update `MeterRegistryPostProcessor` and `MetricsAutoConfiguration` so
that micrometer `MeterFilter` beans are automatically applied.

Fixes gh-11843
7 years ago
Phillip Webb 3f5adfbccc Upgrade to micrometer 1.0.0-rc.8
Closes gh-11575
7 years ago
Phillip Webb 1a2186e6ef Attempt to fix lambda error detection on JDK 9
Update `LambdaSafe` to also detect `ClassCastException` messages that
start with "module/name".

See gh-11584
7 years ago
Phillip Webb c90a5a9e9e Polish 7 years ago
Phillip Webb 5632d043ff Fix enums following upstream micrometer change
See gh-11575
7 years ago
Madhura Bhave 134628a62d Add PathRequest to reactive security for parity 7 years ago
Madhura Bhave e80c22cbf8 Add RequestMatcher for H2 console
Fixes gh-11704
7 years ago
dreis2211 e7248ff273 Use interfaces for collection declarations
Closes gh-11839
7 years ago
Phillip Webb 9a8c182d19 Only use micrometer composites when necessary
Update micrometer auto-configuration so that a `CompositeMeterRegistry`
is only created when more than one `MeterRegistry` bean is declared.
When a composite is crated, it is marked as `@Primary` so that it
can be directly injected. Meter registries can now be defined directly
as beans, and auto-configuration can back off in the usual way.

The `MeterRegistryConfigurer` is now called `MeterRegistryCustomizer`
and is generically types so it's easy to apply customizations to a
particular `MeterRegistry` implementation.

Fixes gh-11799

Co-authored-by: Jon Schneider <jschneider@pivotal.io>
7 years ago
Phillip Webb 3a12f98bab Migrate callbacks to LambdaSafe util
Migrate existing code to the new `LambaSafe` callback handler.

Closes gh-11584
7 years ago
Phillip Webb b0cb728944 Add general utility to deal with lambda callbacks
Add `LambdaSafe` utility that provides a consistent way to deal with
the problems that can occur when calling lambda based callbacks.

See gh-11584
7 years ago
Andy Wilkinson 6582afea4a Polish 7 years ago
Andy Wilkinson e834b25ef1 Polish 7 years ago
Andy Wilkinson f5102516fa Merge branch '1.5.x' 7 years ago
Andy Wilkinson a58c8d5f7b Upgrade to Spring Kafka 2.1.2.RELEASE
Closes gh-11837
7 years ago
Andy Wilkinson 06ca702161 Upgrade to Spring Integration 5.0.1.RELEASE
Closes gh-11501
7 years ago
Andy Wilkinson 244a287484 Merge branch '1.5.x' 7 years ago
Phillip Webb af50a18da9 Polish 7 years ago
Gary Russell d20585db6f Upgrade to Spring AMQP 2.0.2
Closes gh-11834
7 years ago
Andy Wilkinson 32a80f7091 Merge branch '1.5.x' 7 years ago
Stephane Nicoll eba476ba6e Disable LoggersEndpoint if the logging system is disabled
Closes gh-11793
7 years ago
Andy Wilkinson 7a75ca4685 Upgrade to Postgresql 42.2.1
Closes gh-11833
7 years ago
Andy Wilkinson 11e6bcaf4f Upgrade to Jolokia 1.4.0
Closes gh-11832
7 years ago
Andy Wilkinson 2b01d5c70b Upgrade to Narayana 5.7.2.Final
Closes gh-11831
7 years ago
Andy Wilkinson d908d0e876 Upgrade to Jackson 2.9.4
Closes gh-11830
7 years ago
Andy Wilkinson 70dabdbf39 Add application/json and /xml to default compressible mime types
Closes gh-11828
7 years ago
Andy Wilkinson 844782b20b Remove default JUL handler to prevent duplicate console logging
By default, JUL configures a single root handler. That handler is a
ConsoleHandler. Previously, we removed all root handlers from JUL but
this is problematic in environments where other handlers are
registered with JUL and those handlers need to be retained.
0679d436 attempted to fix the problem by leaving the root handlers in
place and only adding and removing the bridge handler. This resulted
in log output from Tomcat (and anything else that uses JUL) being
duplicated.

This commit makes another attempt at tackling the problem. It attempts
to detect JUL's default configuration (a single root handler that's a
ConsoleHandler) and only removes the handler if it appears to be from
the default configuration. For environments where default JUL
configuration is being used, this will prevent duplicate logging and
for environments where custom JUL configuration is being used, this
will prevent that configuration from being undone.

Closes gh-8933
7 years ago
Stephane Nicoll c2a2999799 Use proper classloader for value serialization
Closes gh-11822
7 years ago
Andy Wilkinson 9edcd25c25 Simply test for async dispatch metrics filter registration
Previously, the test in MetricsAutoConfigurationIntegrationTests was
testing the functionality of WebMvcMetricsFilter to verify that the
auto-configuration had registered the filter for async dispatches.
This test was complex and covered the same code as a test in
WebMvcMetricsFilterTests.

This commit reworks the test to examine the dispatcher types on the
filter registration directly instead.

Closes gh-11826
7 years ago
Andy Wilkinson 199088b0c9 Set kotlin.version when Kotlin's Gradle plugin is applied
Closes gh-11711
7 years ago
Stephane Nicoll bdd532cc20 Clarify when a property was not renamed due to an incompatible type
Closes gh-11794
7 years ago
Stephane Nicoll 43e5e83d9c Transparently handle migration from number to java.util.Duration
See gh-11794
7 years ago
Vedran Pavic df28ee7122 Use Spring Session BOM in dependency management
Closes gh-11815
7 years ago
Stephane Nicoll a515c5b7d1 Polish contribution
Closes gh-11811
7 years ago
Johnny Lim 914bdb393f Polish
See gh-11811
7 years ago
dreis2211 c1675c2d5f Use InvocationOnMock.getArgument() where possible
Closes gh-11818
7 years ago
dreis2211 a7663c88d3 Replace casted Mockito.any() calls
Closes gh-11817
7 years ago
Stephane Nicoll ab02e48c44 Fix security section indents
Closes gh-11813
7 years ago
Phillip Webb 5767350380 Polish 7 years ago
Phillip Webb 53b0f0db60 Fix NPE when normalizing client tag URIs
See gh-11798
7 years ago
Stephane Nicoll 3266c68a78 Polish 7 years ago
Stephane Nicoll 5e26d04c05 Only generate time-to-live property for matching endpoints
This commit makes sure that a "cache.time-to-live" property is not
generated for endpoints that do not have a main read operation (i.e. a
read operation with no parameter or only nullable parameters).

This matches the endpoint feature that provides caching for only such
operation.

Closes gh-11703
7 years ago
Stephane Nicoll 90545fb0c6 Update LocalDevToolsAutoConfiguration to use constructor injection
Closes gh-11769
7 years ago
Stephane Nicoll 6569ed8739 Polish contribution
Closes gh-11809
7 years ago
Johnny Lim a0fb138771 Fix to assert parameter names in EndpointServlet.withInitParameters()
See gh-11809
7 years ago
Johnny Lim 6d68806275 Polish
Closes gh-11805
7 years ago
Phillip Webb 1d8942941e Normalize micrometer client tag URIs
Update `MetricsClientHttpRequestInterceptor` so that captured URIs
are normalize to always contain a leading slash.

Fixes gh-11798
7 years ago
Jon Schneider b254761c5e Support micrometer Graphite tagsAsPrefix property
Fixes gh-11797
7 years ago
Phillip Webb 0b689a5b10 Polish MetricsFilter registration async support
Closes gh-11348
7 years ago
Nikolay Rybak b6af06a55f Fix MetricsFilter registration to support async
Update `WebMvcMetricsConfiguration` so that the filter is registered
with the correct settings to support async requests.

See gh-11348
7 years ago
Phillip Webb 25815ca7e1 Refine WebMvcMetricsFilter for async support
Rework `WebMvcMetricsFilter` so that async requests can be handled
correctly.

See gh-11348
7 years ago
Jon Schneider 112ffd7890 Cleanup URLs before using them for metrics
Update `WebMvcTags` to cleanup URLs by removing any double
slashes and any trailing slash.

Fixes gh-11808
7 years ago
Phillip Webb 1da0f2c6b0 Remove FIXME
See gh-11807
7 years ago
Phillip Webb 643cda480f Migrate to updated micrometer Tags class
See gh-11575
7 years ago
Jon Schneider fd237f85cc Extract common micrometer test setup
Create `MetricsRun` that can be used to apply common micrometer test
configuration to a `ApplicationContextRunner`.

Closes gh-11804
7 years ago
Jon Schneider d1de1cd053 Upgrade to micrometer 1.0.0-SNAPSHOT
Move to the snapshots and rework changed APIs in preparation for
the upcoming rc8 release.

See gh-11575
7 years ago
Phillip Webb b234501af3 Polish 7 years ago
Johnny Lim a46e047c5d Polish
Closes gh-11792
7 years ago
Andy Wilkinson 498f66fcdc Test the Gradle plugin against Gradle 4.5
Closes gh-11768
7 years ago
Andy Wilkinson 82d41c1e83 Reinstate information about web endpoints' default URL mapping
Closes gh-11755
7 years ago
Andy Wilkinson 92138e4c32 Polish "Mark thread as interrupted after catching InterruptedException"
See gh-11784
7 years ago
igor-suhorukov 0c30c969bf Mark thread as interrupted after catching InterruptedException
Closes gh-11784
7 years ago
Andy Wilkinson 192fe929c7 Polish "Use custom DataSource if Flyway or Liquibase has user or url"
Closes gh-11751
7 years ago
Dominic Gunn 5d3cd23eed Use custom DataSource if Flyway or Liquibase has user or url
This commit enables a more flexible Liquibase/Flyway configuration by
allowing for a combination of the provider's and the primary
DataSource's configuration to be used. This gives developers the
flexibility to specify only a user or a url and having
Liquibase/Flyway fall back to individual datasource properties rather
than ignoring the Liquibase/Flyway properties and falling back to the
default data source.

See gh-11751
7 years ago
Stephane Nicoll 1c195f5b9a Polish "Migrate server customizer to PropertyMapper"
Closes gh-11772
7 years ago
yulin 19542b975f Migrate server customizer to PropertyMapper
See gh-11772
7 years ago
Andy Wilkinson 988fc18f8c Simplify endpoint enablement and update reference documentation
Closes gh-11755
7 years ago
Stephane Nicoll 1880a25cfb Polish
Closes gh-11788
7 years ago
Johnny Lim 946593238e Align missed bits from trace endpoint changes
Closes gh-11789
7 years ago
Stephane Nicoll cacc3a0b2b Upgrade to Spring Session 2.0.1.RELEASE
See gh-11537
7 years ago
Stephane Nicoll 98c667c2d5 Polish "Use PropertyMapper to configure WebServerFactory"
Closes gh-11773
7 years ago
Huang YunKun 7d4e558f8e Use PropertyMapper to configure WebServerFactory
See gh-11773
7 years ago
Stephane Nicoll 584985c7fa Polish 7 years ago
Stephane Nicoll e95cda10ee Add whenInstanceOf to PropertyMapper
Add an operation on PropertyMapper that takes care of casting. Returns
a source for the requested type if the current value is of the right
type.

Closes gh-11788
7 years ago
Madhura Bhave 3a95a7531a UserDetailsService not created when OAuth configured
Fixes gh-10531
7 years ago
Stephane Nicoll 3f1aaa1f7e Polish contribution
Closes gh-11783
7 years ago
Raja Kolli 64c324612e Polish
See gh-11783
7 years ago
Stephane Nicoll fe7d7e2fc9 Polish 7 years ago
Johnny Lim 15fb62718d Remove unused parameters
Closes gh-11785
7 years ago
Andy Wilkinson cffafe31ba Determine parent ClassLoader in CLI in a more robust manner
Closes gh-11745
7 years ago
Phillip Webb adfb6dc128 Polish 7 years ago
Raja Kolli f9f9e84f96 Upgrade to Maven Checkstyle Plugin 3.0.0
Closes gh-11775
7 years ago
Andy Wilkinson 0679d4369c Use uninstall to remove SL4FJBridgeHandler
Closes gh-8933
7 years ago
Andy Wilkinson 85d4647bda Downgrade to Groovy 2.4.13
There's an extra ClassLoader in the hierarchy of the TCCL in Groovy
2.4 vs Groovy 2.5 so we require an extra getParent() call to avoid
being able to load classes that are visible to the launched URL
class loader.

Closes gh-11745
7 years ago
Andy Wilkinson 3565961d68 Rework HTTP exchange tracing and add support for WebFlux
Closes gh-9980
7 years ago
Andy Wilkinson 11064b5d78 List valid values in failure analysis for enum binding failure
Closes gh-11771
7 years ago
Andy Wilkinson cedb6b2f17 Revert "Clean up the logging system later in context close processing"
This reverts commit 8619256d2a.

See gh-11676
7 years ago
Andy Wilkinson 9cae416755 Explicitly configure and document WebFilter orderings
Closes gh-11756
7 years ago
Andy Wilkinson 9a22201dd3 Polish 7 years ago
Stephane Nicoll 43bac617d4 Add access to short deprecation reason
Closes gh-11770
7 years ago
Andy Wilkinson 4c23afdcd8 Polish 7 years ago
Andy Wilkinson e2cb7a7545 Align default scopes for Google with changes in Spring Security 5.0.1
Closes gh-11573
7 years ago
Andy Wilkinson 8619256d2a Clean up the logging system later in context close processing
Previously, the logging system was cleaned up in response to the
root context's ContextClosedEvent being received. This event is
published early in a context's close processing. As a result, the
logging system is in cleaned up state while, for example, disposable
beans are being destroyed.

This commit reworks the logic that triggers logging system clean up
to use a disposable bean instead. Disposable beans are called in
reverse-registration order. The logging clean up bean is registered as
early as possible so that it should be the last disposable bean to
be called.

Closes gh-11676
7 years ago
Andy Wilkinson 3c462d3b93 Upgrade to Spring Security 5.0.1.RELEASE
Closes gh-11573
7 years ago
Phillip Webb b7c52da457 Allow custom WebTestClient beans
Update `@SpringBootTest` `WebTestClient` support so that the bean
definition is only registered when the user has not defined or
auto-configured their own.

See gh-10556
7 years ago
Phillip Webb 177281a504 Allow custom TestRestTemplate beans
Update `@SpringBootTest` `TestRestTemplate` support so that the bean
definition is only registered when the user has not defined or
auto-configured their own.

See gh-10556
7 years ago
Stephane Nicoll a2a31894a8 Fix typo 7 years ago
Phillip Webb d61ba241b5 Move "testdb" naming to DataSourceProperties
Move the "testdb" naming logic to `DataSourceProperties` and expose
the `deduceDatabaseName` method so they can be used in
auto-configuration.

See gh-11719
7 years ago
Stephane Nicoll b67903a04a Keep "testdb" default datasource name internal
Previously, Hikari's pool name was auto-configured with the value of
`spring.datasource.name` that defaults  to `testdb`, which brings some
confusion.

This commit removes the default `testdb` value on
`spring.datasource.name` as it is a sane default only for an embedded
datasource. It is applied whenever applicable instead.

Closes gh-11719
7 years ago
Phillip Webb 017efda6ec Add @EndpointServlet and migrate Jolokia
Add first class support for Servlet based endpoints and rework the
Jolokia endpoint to use it.

Fixes gh-10264
7 years ago
dreis2211 542c3b7c1e Remove usage of Vector collection
Closes gh-11759
7 years ago
Phillip Webb 3bd940baaa Polish "Add more WebEndpointAutoConfiguration tests"
Closes gh-11754
7 years ago
Yunkun Huang d8527a9708 Add tests for WebEndpointAutoConfiguration
Closes gh-11754
See gh-11684
7 years ago
igor-suhorukov 093ca0a687 Use EnumMap whenever possible
Replace regular Map instances with EnumMap to reduce memory consumption.

Closes gh-11760
7 years ago
Phillip Webb ab6ad6aa4b Polish 7 years ago
Phillip Webb e53bef737f Rename property migrator classes
Rename packages and classes to match the new module name.

See gh-11301
7 years ago
Andy Wilkinson 1a1a62b744 Protect tests against Cassandra startup failures
On CI, Cassandra running inside the Docker container sometimes fails
to start or the start times out. This has nothing to do with Boot so
we  attempt to protect our tests from the flakiness of the container
by allowing 3 startup attempts.
7 years ago
Andy Wilkinson 292025936e Omit null properties from actuator endpoint API response examples
Closes gh-11757
7 years ago
Stephane Nicoll 41bfe07964 Upgrade to Spring Data Kay SR3
Closes gh-11666
7 years ago
Stephane Nicoll b1525f4f2e Rename spring-boot-deprecated-properties-support
Rename `spring-boot-deprecated-properties-support` to
`spring-boot-properties-migrator`.

See gh-11301
7 years ago
Stephane Nicoll 960989cfe6 Polish "Add support for anonymousReadOnly in LdapProperties"
Closes gh-11744
7 years ago
Stephane Nicoll af0bdc893b Add support for anonymousReadOnly in LdapProperties
See gh-11744
7 years ago
Eddú Meléndez 633aefa844 Move tests to use ApplicationContextRunner 7 years ago
Brian Clozel 145d46e093 Polish 7 years ago
Stephane Nicoll 1f4a32f0ad Add a way to signal that an endpoint request is invalid
This commit adds InvalidEndpointRequestException as a technology
agnostic way to signal that an endpoint request is invalid. When such
exception is thrown, the web layer translates that to a 400.

Rather than overriding the reason, this commit makes sure to reuse the
error infrastructure.

Closes gh-10618
7 years ago
Madhura Bhave 55c8ceb440 Polish 7 years ago
Brian Clozel be7c0a15f7 Move reactive ErrorAttributes into spring-boot
Closes gh-11714
7 years ago
Stephane Nicoll 674be06874 Upgrade to Spring Framework 5.0.3.RELEASE
Closes gh-11503
7 years ago
Stephane Nicoll 81b275fa2a Upgrade to Reactor Bismuth-SR5
Closes gh-11572
7 years ago
andrey.onufreyko b19dcb13e2 Replace string arguments with char
Optimize method calls by replacing single character String arguments
with char.

Closes gh-11680
7 years ago
Johnny Lim 768e7c07e6 Polish
Closes gh-11720
7 years ago
dreis2211 5f66c09844 Narrow scope of some variables
Closes gh-11743
7 years ago
dreis2211 b7e663e820 Polish
Closes gh-11724
7 years ago
Phillip Webb 66d5c03c39 Add checkstyle to prevent reactor Assert import 7 years ago
Phillip Webb d0ca1a3eea Rename configuration-analyzer
Rename `spring-boot-configuration-analyzer` to
`spring-boot-deprecated-properties-support`.

Also renamed classes to match and polished some of the code.

See gh-11301
7 years ago
Phillip Webb 66f8279f65 Polish 7 years ago
Andy Wilkinson 77596fa8e6 Polish 7 years ago
Andy Wilkinson a41e28eea2 Merge branch '1.5.x' 7 years ago
Andy Wilkinson f5a8c2a705 Upgrade to Postgresql 42.2.0
Closes gh-11741
7 years ago
Andy Wilkinson 26ea4037a3 Upgrade to Neo4j Ogm 3.0.3
Closes gh-11740
7 years ago
Andy Wilkinson d5b58a60e0 Upgrade to Jetty El 8.5.24.1
Closes gh-11739
7 years ago
Andy Wilkinson 89953f0d46 Upgrade to Jooq 3.10.4
Closes gh-11738
7 years ago
Andy Wilkinson 3b760d3620 Upgrade to Kotlin 1.2.20
Closes gh-11737
7 years ago
Andy Wilkinson 0ebff9aa80 Upgrade to Flyway 5.0.6
Closes gh-11736
7 years ago
Andy Wilkinson 37d3416627 Upgrade to Elasticsearch 5.6.6
Closes gh-11735
7 years ago
Andy Wilkinson c825167ec7 Upgrade to Netty 4.1.20.Final
Closes gh-11734
7 years ago
Andy Wilkinson 67c74ff123 Upgrade to Embedded Mongo 2.0.1
Closes gh-11733
7 years ago
Andy Wilkinson 884486aba7 Upgrade to Hikaricp 2.7.6
Closes gh-11732
7 years ago
Andy Wilkinson 315d2b620e Upgrade to Unboundid Ldapsdk 4.0.4
Closes gh-11731
7 years ago
Andy Wilkinson 59e577d9ac Upgrade to Cassandra Driver 3.4.0
Closes gh-11730
7 years ago
Andy Wilkinson 1fdfcfd042 Upgrade to Couchbase Client 2.5.4
Closes gh-11729
7 years ago
Andy Wilkinson 61eb93f9b0 Upgrade to Atomikos 4.0.6
Closes gh-11728
7 years ago
Andy Wilkinson b5444430ca Merge branch '1.5.x' 7 years ago
Brian Clozel a8baf42f2f Ensure that CharacterEncodingFilter is ordered first
This commit makes sure that `CharacterEncodingFilter` is ordered with
the `Ordered.HIGHEST_PRECEDENCE` and that other filters, potentially
reading the request body, are ordered after.

In this particular case, both `WebMvcMetricsFilter` and
`ErrorPageFilter` are now ordered at `Ordered.HIGHEST_PRECEDENCE + 1` to
avoid cases where the request body is read before the encoding
configuration is taken into account.

Closes gh-11607
7 years ago
Stephane Nicoll 6aa639253a Analyse the environment for properties that are no longer supported
This commit adds a new `spring-boot-configuration-analyzer` module that
can be added to any app to analyze its environment on startup.

Each configuration key that has a matching replacement is temporarily
transitioned to the new name with a `WARN` report that lists all of
them.

If the project defines configuration keys that don't have a replacement,
an `ERROR` report lists them with more information if it is available.

Closes gh-11301
7 years ago
sdeleuze d1b18b75d7 Manage dependencies for kotlin-stdlib-jdk7/8
As explained in the "Split package compatibility" section of
https://blog.jetbrains.com/kotlin/2017/09/kotlin-1-2-beta-is-out/
kotlin-stdlib-jdk7 and kotlin-stdlib-jdk8 are the recommended
dependencies to use with Kotlin 1.2 for Java 9+ compatibility.

Closes gh-11716
7 years ago
Johnny Lim a0f6abffb6 Use the platform-specific line separator
Closes gh-11674
7 years ago
Johnny Lim 13a7c9df4b Add missing null checks and volatile keyword
Closes gh-11692
7 years ago
Andy Wilkinson 66164bff14 Polish 7 years ago
Andy Wilkinson fbb1ba1bb3 Move actuator mappings introspection classes into dedicated packages
Closes gh-9979
7 years ago
Andy Wilkinson e973eaf2c3 Configure WebClient to use same address (IPv4 or IPv6) as server
Closes gh-11712
7 years ago
Stephane Nicoll 886ee9c870 Polish 7 years ago
Stephane Nicoll 68cc373daa Polish 7 years ago
Stephane Nicoll 126f8783a2 Polish 7 years ago
Phillip Webb 80bba046a3 Fix broken javadoc import 7 years ago
Phillip Webb bda9b892b3 Add direct WebFlux and WebMvc endpoint support
Add `@ControllerEndpoint` and `@RestControllerEndpoint` annotations that
can be used to develop a Spring-only request mapped endpoint. Both
Spring MVC and Spring WebFlux are supported.

This feature is primarily for use when deeper Spring integration is
required or when existing Spring Boot 1.5 projects want to migrate to
Spring Boot 2.0 without re-writing existing endpoints. It comes at the
expense of portability, since such endpoints will be missing from
Jersey.

Fixes gh-10257
7 years ago
Phillip Webb 340ef52f78 Refactor endpoint path concerns
Create a `PathMappedEndpoint` interface that allows any `ExposedEndpoint`
to provide root path details. The `EndpointPathResolver` interface has
been renamed to `PathMapper` and is now only used during endpoint
discovery.

`EndpointPathProvider` has been replaced with `PathMappedEndpoints`
which simply finds relevant path mapped endpoints.

Fixes gh-10985
7 years ago
Phillip Webb 1d39feffea Overhaul actuator endpoint code
Refactor several areas of the actuator endpoint code in order to make
future extensions easier. The primary goal is to introduce the concept
of an `ExposableEndpoint` that has technology specific subclasses and
can carry additional data for filters to use. Many other changes have
been made along the way including:

* A new EndpointSupplier interface that allows cleaner separation of
  supplying vs discovering endpoints. This allows cleaner class names
  and allows for better auto-configuration since a user can choose to
  provide their own supplier entirely.

* A `DiscoveredEndpoint` interface that allows the `EndpointFilter`
  to be greatly simplified. A filter now doesn't need to know about
  discovery concerns unless absolutely necessary.

* Improved naming and package structure. Many technology specific
  concerns are now grouped in a better way. Related concerns are
  co-located and concepts from one area no longer leakage into another.

* Simplified `HandlerMapping` implementations. Many common concerns have
  been pulled up helping to create simpler subclasses.

* Simplified JMX adapters. Many of the intermediary `Info` classes have
  been removed. The `DiscoveredJmxOperation` is now responsible for
  mapping methods to operations.

* A specific @`HealthEndpointCloudFoundryExtension` for Cloud Foundry.
  The extension logic used to create a "full" health endpoint extension
  has been made explicit.

Fixes gh-11428
Fixes gh-11581
7 years ago
Phillip Webb dc935fba48 Polish 7 years ago
Madhura Bhave d9ff51ccd3 Add StaticResourceRequest for WebFlux Security
Closes gh-11040
7 years ago
Madhura Bhave 5e2cc02499 Move servlet specific security auto-config 7 years ago
Stephane Nicoll 5c164d850e Upgrade to Spring Kafka 2.1.1.RELEASE
Closes gh-11524
7 years ago
Andy Wilkinson fedc4647e1 Use same InetAddress for client and server in endpoint tests
Previously, the server was created with out an explicitly configured
address. This lead to it using any local address which will prefer
IPv6 (::0) if it's available. By contrast, the client was created
with a base URL that specified localhost as the host. This meant the
the client would prefer to connect to IPv4. Normally this wouldn't
cause a problem as nothing would be listening on the port in the IPv4
stack so the client would then connect to the server being tested
using the IPv6 stack. However, if another process was listening to the
port in the IPv4 stack, the client would connect to the wrong server.
This could lead to an unexpected 404 response (if the wrong server
was an HTTP server) or a hang if it was not.

There's a chance, although I think it's unlikely, that the problem
described above is the cause of gh-10569. I think it's unlikely as
the hang tracked by gh-10569 only occurs when running the WebFlux
endpoint integration tests using Reactor Netty. If it was the problem
described above, there's no reason that I can think of why we
wouldn't have also seen it with the Web MVC endpoint integration
tests.
7 years ago
Brian Clozel fb7026b832 Add documentation for HTTP/2 support in Jetty
See gh-10902
7 years ago
Stephane Nicoll c926bed6f5 Polish "Fix modifiers order"
Closes gh-11681
7 years ago
igor-suhorukov e2d05607f2 Fix modifiers order
See gh-11681
7 years ago
Johnny Lim 9d24186942 Use this() in EndpointRequests
Closes gh-11690
7 years ago
Brian Clozel 247b7f0842 Fix WebFlux default error view for null exception messages
This commit prevents NullPointerExceptions when the default HTML error
view is being rendered with a `null` message.

Fixes gh-11677
7 years ago
Phillip Webb 0b81f78a2a Revert "Create CloudFoundry-specific EndpointWebExtension"
This reverts commit 7189f426ed.
7 years ago
Phillip Webb fc29f54868 Make Context implement AnnotationConfigRegistry
Update `AnnotationConfigReactiveWebServerApplicationContext` to
implement `AnnotationConfigRegistry`.

Fixes gh-11686
7 years ago
Phillip Webb f3379668ac Polish 7 years ago
Phillip Webb 6d93573db0 Merge branch '1.5.x' 7 years ago
Stephane Nicoll ba6be4f22f Merge branch '1.5.x' 7 years ago
Stephane Nicoll 8704cf1fe7 Harmonize metric property names
See gh-11667
7 years ago
Stephane Nicoll efd941bbe0 Merge branch '1.5.x' 7 years ago
Stephane Nicoll 6086bc714f Fix json structure 7 years ago
Stephane Nicoll aa748cb0ef Polish "Use System.lineSeparator()""
Closes gh-11665
7 years ago
Johnny Lim d8c83af987 Use System.lineSeparator()
See gh-11665
7 years ago
Stephane Nicoll 7002507304 Polish 7 years ago
Stephane Nicoll beaa49a2d6 Polish "Add auto-configuration for RabbitMQ metrics"
Closes gh-10887
7 years ago
Arnaud Cogoluègnes 58c8c4d56a Add auto-configuration for RabbitMQ metrics
See gh-10887
7 years ago
Andy Wilkinson 1d9f9716e9 Merge branch '1.5.x'
# Conflicts:
#	spring-boot-project/spring-boot-dependencies/pom.xml
7 years ago
Andy Wilkinson e1ec0562b2 Revert "Disable Reactor Netty's use of kqueue/epoll"
The failure continued to occur so this commit reverts commit
42c1ce65e9.

See gh-10569
7 years ago
Andy Wilkinson d5c9b9e12f Start building against snapshots for Spring Data Kay SR3
See gh-11666
7 years ago
Stephane Nicoll 5cb6c086b6 Rename micrometer instrumentation flags
Closes gh-11667
7 years ago
Stephane Nicoll 49b5fe0c29 Polish
As `validation-api` 2 is available by default, this commit adds the
integration test as a regular test case. The integration test is kept to
exercise what happens in a standard project.

See gh-11512
7 years ago
Stephane Nicoll 60f5cf10ba Merge branch '1.5.x' 7 years ago
Andy Wilkinson 849baa4c02 Do not require after in audit events endpoint
Closes gh-11605
7 years ago
Brian Clozel c233125f1d Don't render error view if response is committed
This commit prevents the default error view from rendering itself if the
response has been committed already. In this case, it is impossible to
change the HTTP response status and write a proper response - trying to
do so often results in a `IllegalStateException` since the response body
has already been written to.

Fixes gh-11580
7 years ago
Andy Wilkinson 42c1ce65e9 Disable Reactor Netty's use of kqueue/epoll
There is a suspicion that the use of epoll is causing the intermittent
failures being tracked by gh-10569. This commit disables the use of
epoll to see if it improves the situation.

See gh-10569
7 years ago
Stephane Nicoll 40c537daa0 Polish 7 years ago
Andy Wilkinson 87182a3a2b Stop configuring the Logback console appender to use UTF-8
Previously, the default Logback configuration set the console
appenders charset to UTF-8. This was inconsistent with the Logback
file appender and Log4j2's console and file appenders, all of which
used the platform's default.

This commit removes the configuration of the Logback console
appender's charset. This means that it will use the platform's
default charset, aligning it with the Logback file appender and
both Log4j2 appenders.

Closes gh-11611
7 years ago
Andy Wilkinson 54c0cf513b Polish 7 years ago
Andy Wilkinson 3904f49c9f Configure ServletContext before initializing S…C…Initializer beans
Previously, the ServletContext was configured after any
ServletContextInitializer beans had been initialized. This meant that
any configuration class that provided such a bean would be initialized
before the ServletContext was configured. If the configuration class
used the ServletContext in its initializtaion that it would see it in
its default, unconfigured state.

This commit reworks the configuration of the ServletContext so that
it happens before any ServletContextInitializer beans are initialized.

Closes gh-10699
7 years ago
Andy Wilkinson d8b3c7cc3c Make AnnotationConfigSWSApp…Context implement AnnotationConfigRegistry
Closes gh-11658
7 years ago
Johnny Lim e7185ea2b1 Polish
Closes gh-11655
7 years ago
Stephane Nicoll d43346d6c2 Polish "Fix potential resource leaks"
Closes gh-11624
7 years ago
igor-suhorukov 5a4238acfc Fix potential resource leaks
See gh-11624
7 years ago
Johnny Lim d27b46cf73 Fix a wrong import for SocketChannel
Closes gh-11648
7 years ago
Eddú Meléndez cecef7a7df Upgrade to JUnit Jupiter 5.0.3
Closes gh-11649
7 years ago
Stephane Nicoll f8af6c8134 Merge branch '1.5.x' 7 years ago
Andy Wilkinson ffc99b03dd Remove use of deprecated Gradle API from plugin's public API
This commit removes the use of the incubating PropertyState and
Provider API that was introduced in Gradle 4.0 and deprecated in
Gradle 4.3. A not-deprecated-but-still-incubating replacement was
introduced in Gradle 4.3. The short life of PropertyState and Provider
has made me wary of using an incubating Gradle API in our public API
as it may not be stable for long. Therefore, this commit does not move
to the replacement as it is incubating. Instead, it falls back to
using Gradle's convention mapping. This is internal API, but its use
is not part of our public API and I perceive the risk of using it to
be lower than using the deprecated and/or incubating API alternatives.

Closes gh-11640
7 years ago
Andy Wilkinson 5e17fc775c Test the Gradle plugin against Gradle 4.4.1
Closes gh-11654
7 years ago
Andy Wilkinson 2668e41dd5 Make it easier to just use Boot’s dependency management with Gradle
Closes gh-11059
7 years ago
Andy Wilkinson 3cf1fb6763 Polish formatting in Actuator API documentation 7 years ago
Andy Wilkinson 67a299020b Rework mappings endpoint
Improve the structure of the response and include mappings from
WebFlux and Servlet and Filter registrations in addition to the
mappings from Spring MVC.

Closes gh-9979
7 years ago
Brian Clozel 1f26a0314c Sanitize inputs in default reactive HTML error view
This commit uses HTML escaping to sanitize error inputs that are
displayed in the default reactive HTML error view.

Fixes gh-11582
7 years ago
Brian Clozel 381d759ef1 Support server.compression with reactive servers
This commit adds support for HTTP compression with reactive servers,
with the following exceptions:

* `server.compression.mime-types` and
`server.compression.exclude-user-agents` are not supported by Reactor
Netty at the moment

* `server.compression.min-response-size` is only supported by Reactor
Netty right now, since other implementations rely on the
`"Content-Length"` HTTP response header to measure the response size
and most reactive responses are using `"Transfer-Encoding: chunked"`.

Closes gh-10782
7 years ago
Stephane Nicoll bf88073f7e Tighten Liquibase auto-configuration to require Liquibase 3
Closes gh-11641
7 years ago
Stephane Nicoll 023bc13fb6 Merge branch '1.5.x' 7 years ago
Brian Clozel 1e648801bd Move spring.mvc.media-types to content-negotiation
This commit moves "spring.mvc.media-types" to the
"spring.mvc.content-negotiation.*" namespaces introduced in gh-11105.

Closes gh-11636
7 years ago
Stephane Nicoll 76057be9ac Merge branch '1.5.x' 7 years ago
Andy Wilkinson f7ddacf937 Update AuditEventRepository javadoc to describe behaviour of after
The behaviour was changed in 2b99962a. This commit updates the
javadoc to hopefully clarify that Instant.isAfter(Instant) is used.

Closes gh-11612
7 years ago
Andy Wilkinson 5b8a2f9675 Improve context hierarchy handling in Actuator endpoints
Previously, a number of Actuator endpoints ignored a context hierarchy
or assumed that it would always be linear. This commit reworks the
affected endpoints so that the no longer assume a linear hierarchy.

A side-effect of a non-linear hierarchy is that there may be multiple
different beans with the same name (in a linear hierarchy, a bean
with the same name as one in an ancestor context, replaces that bean).
The affected endpoints have also been updated so that, when bean names
are used as keys, those keys are grouped by application context. This
prevents a bean in one context from accidentially overwriting a bean
in another context.

Closes gh-11019
7 years ago
sdeleuze d4c91d2fe0 Improve Kotlin extensions doc about type erasure
Since type erasure can be fixed only when using
ParameterizedTypeReference based Java methods, TestRestTemplate
API documentation should be updated to specify which extensions
are subject to type erasure, and which are not.

Closes gh-11604
7 years ago
Gary Russell 0af67b86ed Polish Kafka documentation
Closes gh-11638
7 years ago
Brian Clozel 22c22a1ced Move server.session.* to server.servlet.session.*
Closes gh-11589
7 years ago
Stephane Nicoll 199d2e30d7 Polish 7 years ago
Andy Wilkinson 23d8d608c4 Polish 7 years ago
Stephane Nicoll b2ec7c58a6 Merge branch '1.5.x' 7 years ago
Stephane Nicoll e258884dd3 Polish doc
Closes gh-11529
7 years ago
Andy Wilkinson f7e408945e Use Instant for Session creation and last accessed times
Closes gh-10976
7 years ago
Brian Clozel 67e5897c40 Disable suffix pattern matching in Spring MVC
This commit disables by default suffix pattern matching in Spring MVC
applications. As described in the Spring MVC documentation (see
https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-ann-requestmapping-suffix-pattern-match),
this is considered as best practice.

This change also introduces new configuration properties to achieve
similar results in a safer way (using query parameters) or to rollback
to the former default.

Closes gh-11105
7 years ago
Stephane Nicoll 2bf662f231 Remove hdrhistogram managed dependency
Closes gh-10923
7 years ago
Johnny Lim 77150f8dc9 Polish
Closes gh-11630
7 years ago
Stephane Nicoll 3f88906b97 Fix handling of ResponseStatusException
This commit updates DefaultErrorAttributes to handle
ResponseStatusException explicitly. This exception is used in a
WebFlux application to signal that the processing of the query has
failed with an HTTP status code and a reason phrase. The latter is now
properly mapped to the `message` attribute of the response body.

Closes gh-11614
7 years ago
Eddú Meléndez fb88a56af0 Upgrade to Spring Session 2.0.0.RELEASE
Closes gh-11619
7 years ago
Johnny Lim f6780bed65 Remove an unnecessary assertion
Closes gh-11622
7 years ago
Andy Wilkinson 2b99962a85 Replace use of Date with OffsetDateTime and Instant in Actuator
Closes gh-10976
7 years ago
Stephane Nicoll a99adb1047 Upgrade to Micrometer 1.0.0-rc.7
See gh-11598
7 years ago
Stephane Nicoll 8aaf95b792 Polish 7 years ago
Johnny Lim 136e26e307 Fix typo in DynamicRegistrationBean class name
Closes gh-11606
7 years ago
Stephane Nicoll ae3cd75d1a Polish "Upgrade to Micrometer 1.0.0-rc.6"
Closes gh-11598
7 years ago
Jon Schneider ccc820f723 Upgrade to Micrometer 1.0.0-rc.6
See gh-11598
7 years ago
Brian Clozel 69d5b7a4e8 Add missing header expectations in tests
Fixes gh-11318
7 years ago
Stephane Nicoll f10210f769 Make MetricsEndpoint response types public
Closes gh-11602
7 years ago
Andy Wilkinson a051e30fe0 Publish an event after refresh but before runners are called
This commit partially reverts the changes made in ec470fbe. While
the started message continues to be logged before any application and
command line runners are called, the publishing of
ApplicationReadyEvent now happens after the runners have been called.
Additionally, a new event, named ApplicationStartedEvent, has been
introduced. This new event is published after the context has been
refreshed but before any application and command line runners are
called.

Closes gh-11484

The reworking of the events described above also means that either
an ApplicationReadyEvent or an ApplicationFailedEvent will be
published and the latter should never be published once the former
has been published.

Closes gh-11485
7 years ago
Stephane Nicoll 4a9123d6e3 Detect user-defined RedisCacheConfiguration
This commits improves the cache auto-configuration for Redis by looking
up a custom "RedisCacheConfiguration" bean that allows to take full
control over the `RedisCacheManager`.

Closes gh-11599
7 years ago