Commit Graph

1716 Commits

Author SHA1 Message Date
Johnny Lim 5b41c3b608 Polish
See gh-18192
2019-09-12 14:55:47 +02:00
Andy Wilkinson f033016364 Allow @Component on mutable @ConfigurationProperties
Update configuration properties support to allow the `@Component`
annotation to be used on `@ConfigurationProperties` beans as long
as they are mutable.

This restores the behavior of Spring Boot 2.1 for mutable beans whilst
still allowing us to enforce the stricter rules for immutable value
object configuration properties.

Closes gh-18138
2019-09-09 23:04:50 -07:00
gaohanghang 74d2fe472a Simplify code
See gh-18175
2019-09-09 09:51:55 +02:00
Andy Wilkinson 58eddb8fa4 Become compatible with Jackson 2.10 while remaining 2.9 compatible
See gh-17999
2019-09-05 17:13:45 +01:00
Stephane Nicoll 7cb2eb1850 Polish "Polish test"
See gh-18130
2019-09-05 08:54:35 +02:00
Eddú Meléndez 16a0188666 Polish test
See gh-18130
2019-09-05 08:54:06 +02:00
Phillip Webb ebae76b1b8 Protect against null BindHandler.onStart result
Fixes gh-18129
2019-09-04 14:02:26 -07:00
Phillip Webb b43edf5493 Merge branch '2.1.x'
Closes gh-18118
2019-09-03 18:20:24 -07:00
michal 1f97a60d16 Clarify documentation on logback include files
Update documentation and comments on Logback to show the correct
use of `default.xml` rather than `base.xml`.

See gh-16901
2019-09-03 18:15:59 -07:00
dreis2211 b4350a9d96 Remove unnecessary blank lines
See gh-18089
2019-09-03 08:48:10 +02:00
Andy Wilkinson 6017f2f529 Merge branch '2.1.x'
Closes gh-18083
2019-09-01 20:10:57 +01:00
Andy Wilkinson ee89e0effd Fix client auth with Jetty
Fixes gh-17541
2019-09-01 19:49:03 +01:00
dreis2211 3e35a6616c Fix duplicated words
See gh-18004
2019-09-01 09:09:38 +02:00
Andy Wilkinson d03ac6457e Merge branch '2.1.x'
Closes gh-18027
2019-08-31 08:26:05 +01:00
Andy Wilkinson 3d23277b8f Tolerate invalid mimetype in Reactory Netty compression predicate
Fixes gh-18018
2019-08-31 08:18:18 +01:00
Phillip Webb dc0a642fc0 Fix chackstyle violations in test
See gh-18012
2019-08-30 22:00:17 -07:00
Phillip Webb 1283bc05d7 Merge branch '2.1.x'
Closes gh-18021
2019-08-30 14:41:36 -07:00
Phillip Webb 5938ca78b6 Fix request matcher management context support
Fix caching issues in `ApplicationContextRequestMatcher` and allow
subclasses to ignore an application context entirely. Update existing
matcher implementations so that they deal with the management context
correctly.

Prior to this commit, the `ApplicationContextRequestMatcher` would
return a context cached from the first request. It also didn't
provide any way to ignore a context. This meant that if the user was
running the management server on a different port the matching results
could be inconsistent depending on if the first request arrived on
the regular context or the management context. It also meant that we
could not distinguish between the regular context and the management
context when matching.

Closes gh-18012
2019-08-30 14:36:16 -07:00
Andy Wilkinson bbec7b0f37 Merge branch '2.1.x'
Closes gh-17994
2019-08-29 12:30:06 +01:00
Andy Wilkinson 9961647c7f Improve handling of reserved characters in MetaInfResourceManager
Previously, MetaInfResourceManager that we use with Undertow to serve
static resources from jar's META-INF/resources did not correctly
handle characters in the path that should be percent-encoded when
used in a URL.

This commit updates MetaInfResourceManager to encode the path before
it is used to create a URL. Prior to this encoding, encoded slashes
(%2F) are decoded as, unlike other encoded characters in the request's
URL, encoded slashes are not decoded prior to calling the
ResourceManager.

Fixes gh-17853
2019-08-29 12:13:40 +01:00
Vedran Pavic cb3efc1ef6 Add dependency management for IBM DB2 JDBC driver
See gh-17782
2019-08-27 11:19:19 +02:00
Gang Zhang 2b29bea55c Use putIfAbsent() instead of containsKey
See gh-17913
2019-08-23 13:21:23 +02:00
Phillip Webb cb5ca7997b Polish 2019-08-22 15:17:34 -07:00
Phillip Webb 6270f5008d Polish lenient enum converter
See gh-17798
2019-08-22 14:42:07 -07:00
Andy Wilkinson 05e089601e Remove default favicon and support for serving from classpath root
Closes gh-17925
2019-08-22 13:53:13 +01:00
Andy Wilkinson 24b5b0d93e Polish 2019-08-21 15:50:33 +01:00
Andy Wilkinson 87339405f3 Merge branch '2.1.x'
Closes gh-17928
2019-08-21 15:18:13 +01:00
Andy Wilkinson abe3d38527 Fix OoM error when starting Tomcat with max int load on startup
Fixes gh-17927
2019-08-21 15:17:54 +01:00
Andy Wilkinson 7f8944d00f Polish 2019-08-19 17:31:56 +01:00
Andy Wilkinson ab87b2a39b Polish 2019-08-19 16:05:43 +01:00
Stephane Nicoll 7f06504006 Detect ConfigurationProperties using autowiring constructor
This commit improves InvalidConfigurationPropertiesException failure
analysis by adding a dedicated description when a single autowiring
constructor is found. When @Component is removed, such constructor is
used for properties binding and will not apply the same semantics as
before.

Closes gh-17750
2019-08-19 11:01:49 +02:00
Stephane Nicoll fc0cee5ea7 Merge branch '2.1.x' 2019-08-17 06:47:33 +02:00
lijuny d33ed84f1f Remove redundant code
See gh-17875
2019-08-17 06:41:10 +02:00
dreis2211 d4affd7f85 Use hasSize() assertion in favor of length checks
See gh-17874
2019-08-17 06:39:41 +02:00
lijuny 64344214e1 Delete redundant variables
See gh-17864
2019-08-15 07:05:10 +02:00
Andy Wilkinson ba4c5be2fd Remove unused field
See gh-17562
2019-08-14 19:41:14 +01:00
Madhura Bhave 468b2e6d57 Merge branch '2.1.x'
Closes gh-17857
2019-08-13 15:15:14 -07:00
Madhura Bhave 3515ec1f29 Support relaxed binding for properties before environment is prepared
Fixes gh-17843
2019-08-13 14:54:27 -07:00
dreis2211 b605cddb10 Polish some Collections API calls
See gh-17825
2019-08-11 10:36:10 +02:00
zhuzhuman 84eacc49ed Simplify for statement with Collection copy
See gh-17827
2019-08-11 10:34:11 +02:00
lijuny 844a8d8027 Simplify some code
See gh-17832
2019-08-11 10:05:36 +02:00
Madhura Bhave 835108e522 Support binding of YAML style true/false values to 'ON'/'OFF'.
Fixes gh-17798
2019-08-09 16:19:15 -07:00
Stephane Nicoll b8a1043e98 Merge branch '2.1.x'
Closes gh-17813
2019-08-08 16:33:31 +02:00
Stephane Nicoll 1b3a6d1616 Polish "Configure a temporary directory with Undertow"
See gh-17778
2019-08-08 16:29:43 +02:00
Andy Chen 0388f954af Configure a temporary directory with Undertow
See gh-17778
2019-08-08 16:17:34 +02:00
Bo Zhang c19057e117 Simplify conditional statements
See gh-17779
2019-08-05 15:13:35 -07:00
freekry a9e7c4ec95 Fix typo in JsonComponent javadoc
See gh-17776
2019-08-04 08:59:40 +02:00
Phillip Webb 2cdceb92bf Polish 2019-08-03 14:29:20 +01:00
Phillip Webb b29e81fcd9 Allow defaultBindHandler to be specified on Binder
Allow a `defaultBindHandler` to be specified on the `Binder` instance
to save needing to pass it to each `bind` method call.

Closes gh-17773
2019-08-03 11:58:28 +01:00
Phillip Webb fb6568be73 Improve PropertySourceLoader file extension error
Refine the `IllegalStateException` thrown from `PropertySourceLoader`
for unknown extensions to also indicated that folder references must end
in '/'.

Closes gh-17241
2019-08-03 11:36:36 +01:00
Stephane Nicoll 89aefa6cfb Enable binding for scanned configuration properties
Closes gh-16822
2019-08-02 16:19:33 +02:00
Madhura Bhave 4e29f7b0ae Merge branch '2.1.x'
Closes gh-17762
2019-08-01 16:05:19 -07:00
Madhura Bhave 80f568bd47 Clarify RestTemplateBuilder rootUri documentation
Closes gh-15343
2019-08-01 15:59:24 -07:00
Madhura Bhave 02fd0c45e4 Merge branch '2.1.x'
Closes gh-17748
2019-07-31 13:01:46 -07:00
Madhura Bhave 96235ea674 Fix ordering of JSON property source relative to servlet sources
Fixes gh-17652
2019-07-31 12:43:08 -07:00
Phillip Webb da4f436140 Change SearchStrategy EXHAUSTIVE to TYPE_HIERARCHY
Fixup references following upstream Spring Framework change.
2019-07-31 15:11:43 +01:00
Phillip Webb ea5b624a39 Polish 2019-07-30 12:03:19 -07:00
Madhura Bhave 61b86ff231 Polish "Add support for configuring logging groups"
See gh-17515

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
2019-07-30 11:28:58 -07:00
HaiTao Zhang b9047c22e0 Add support for configuring logging groups via endpoint
See gh-17515
2019-07-30 11:13:07 -07:00
dreis2211 a938a8b79c Fix checkstyle warning
See gh-17692
2019-07-29 16:48:57 +02:00
Phillip Webb e5497665cf Merge branch '2.1.x'
Closes gh-17688
Closes gh-17689
2019-07-29 14:48:26 +01:00
Phillip Webb d7ee504ee0 Only include our own mime mappings in Undertow
Update `UndertowServletWebServerFactory` so that only our own mime type
mappings are included. Prior to this commit both our mime mappings and
Undertow's default mime mappings would always be included.

Fixes gh-17687
2019-07-29 14:44:57 +01:00
Stephane Nicoll fc2c98ffad Merge branch '2.1.x' 2019-07-26 12:08:03 +02:00
Stephane Nicoll ac4dcfbf9a Improve detection of NoSuchMethodError cause
Closes gh-17649
2019-07-26 12:01:35 +02:00
Phillip Webb 8bc780762a Merge branch '2.1.x' 2019-07-24 11:42:48 +01:00
Phillip Webb fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 2019-07-24 11:41:32 +01:00
Phillip Webb 913e831f4e Merge '1.5.x' into 2.0.x 2019-07-24 11:39:58 +01:00
Stephane Nicoll 5ed3185d04 Merge branch '2.1.x'
Closes gh-17621
2019-07-24 11:37:13 +02:00
Stephane Nicoll 057ca8f6a8 Polish "Clarify description of "logging.file.max-history""
See gh-17567
2019-07-24 11:36:15 +02:00
lihongmingming 00a5528d7f Clarify description of "logging.file.max-history"
See gh-17567
2019-07-24 11:36:15 +02:00
dreis2211 e47d56c76d Extend JavaVersion tests
See gh-17612
2019-07-24 11:13:07 +02:00
dreis2211 c8097692ea Align JavaVersion.NINE name with JDK versioning
See gh-17611
2019-07-24 11:12:02 +02:00
Stephane Nicoll 38a42a8600 Improve NoSuchMethodError message parsing
Closes gh-17544
2019-07-23 10:42:33 +02:00
Stephane Nicoll 0ff4484568 Merge branch '2.1.x'
Closes gh-17599
2019-07-22 10:27:04 +02:00
dreis2211 c2b6939ae1 Cover more known Java versions in JavaVersion
See gh-17590
2019-07-22 10:24:54 +02:00
Phillip Webb ca5df3cc9c Cache TypeExcludeFilter delegates
Cache TypeExcludeFilter delegates to save repeated calls to
`beanFactory.getBeansOfType`.

Closes gh-17595
2019-07-20 13:56:42 +01:00
Andy Wilkinson cc85746942 Merge branch '2.1.x'
Closes gh-17575
2019-07-18 17:17:05 +01:00
Andy Wilkinson 591250f75e Polish "Hide loader classes from Tomcat's ServletContext resource paths"
See gh-17538
2019-07-18 17:05:31 +01:00
adavid9 a81325bbbc Hide loader classes from Tomcat's ServletContext resource paths
See gh-17538
2019-07-18 17:05:27 +01:00
Andy Wilkinson 0f105f7471 Fail fast if spring.config.location uses unknown file extension
Closes gh-17241
2019-07-18 15:34:49 +01:00
dreis2211 2038fac825 Remove testsupport.assertj package
See gh-17557
2019-07-18 14:20:28 +02:00
Andy Wilkinson 3bf5cf1124 Merge branch '2.1.x'
Closes gh-17562
2019-07-18 07:22:24 +01:00
Andy Wilkinson b725c60177 Deprecate DeploymentInfo customization with reactive Undertow
Fixes gh-17555
2019-07-18 06:54:38 +01:00
Phillip Webb a9ba7080ce Merge branch '2.1.x' 2019-07-17 21:48:42 +01:00
Phillip Webb d567261790 Polish 2019-07-17 21:38:44 +01:00
Andy Wilkinson dad7fb4f6d Add NettyServerCustomizer beans to the auto-configured factory
Closes gh-17556
2019-07-17 14:58:11 +01:00
Andy Wilkinson ea1139755d Ensure that customizers registered multiple times are only called once
Closes gh-17264
2019-07-17 14:52:29 +01:00
Stephane Nicoll 56ce2b8e3f Polish "Add metrics support for idle jdbc connections"
See gh-17504
2019-07-17 14:14:47 +02:00
ayudovin 9acc02b5cc Add metrics support for idle jdbc connections
See gh-17504
2019-07-17 14:14:47 +02:00
Stephane Nicoll cc6f321da4 Improve detection of NoSuchMethodError on Java 13
Closes gh-17544
2019-07-17 11:17:37 +02:00
Andy Wilkinson cbc17c237b Make it easier to determine each servlet filter's order
Closes gh-17520
2019-07-15 17:10:32 +01:00
Stephane Nicoll a3e94f4412 Harmonize component scan in slice tests
This commit updates ConfigurationPropertiesScanRegistrar to apply the
same component scan filters than the ones applied on standard classpath
scanning.

As a result, configuration properties scanning is automatically disabled
in slice tests and can be included by an explicit import or a dedicated
TypeFilter implementation if necessary.

Closes gh-16659
2019-07-15 15:05:12 +02:00
Phillip Webb eff1147ccc Rename classpath runner package
Remove `runner` since we're no longer tied to JUnit 4.

See gh-17491
2019-07-15 13:40:26 +01:00
Phillip Webb 1117fdb2b3 Make ModifiedClassPathExtension package private
Meta-annotate `ClassPathExclusions` and `ClassPathOverrides` with
so that the `ModifiedClassPathExtension` no longer needs to be
used directly.

See gh-17491
2019-07-15 13:38:26 +01:00
Phillip Webb bd81bb90eb Polish ModifiedClassPath support
See gh-17491
2019-07-15 00:32:34 +01:00
dreis2211 0f0278e69b Migrate ModifiedClassPath tests to JUnit 5
Migrate the remaining JUnit 4 tests to JUnit 5, making use of the
new `ModifiedClassPathExtension`.

See gh-17491
2019-07-15 00:31:03 +01:00
dreis2211 1bc9c8544e Polish LoggingApplicationListenerTests
See gh-17491
2019-07-15 00:26:12 +01:00
Phillip Webb 01933f9b06 Merge previously split strings
Merge some string lines that were previously split because of the
90 chars wide formatting.
2019-07-15 00:24:19 +01:00
Phillip Webb c3816bfe7b Polish output capture names 2019-07-15 00:24:18 +01:00
Madhura Bhave 6164e3efe8 Merge branch '2.1.x' 2019-07-10 18:26:25 -07:00
Madhura Bhave aebb60d8b8 Fix tests
Setting the log file name to a random value in smoke tests
doesn't work because the logger context has already been initialized.
2019-07-10 18:14:58 -07:00
Madhura Bhave d590c3ed10 Merge branch '2.1.x'
Closes gh-17486
2019-07-10 15:32:22 -07:00
Madhura Bhave 773dda3d55 Log file location should be evaluated just once
Using a random value for the logfile name caused
the logfile endpoint to return a 404 as the name
was resolved from the environment on every request.
This commit registers a bean for LogFile which is then
used by the logfile endpoint.

Fixes gh-17434
2019-07-10 14:46:09 -07:00
Brian Clozel 3c28622ebc Add support for reactor-tools debug agent
The `reactor-tools` dependency now brings a new Reactor Debug Agent
which instruments loaded classes for better Reactor stacktraces.
This commit removes the `spring.reactor.stacktrace-mode.enabled`
configuration property since the related Reactor Hook is about to be
removed.
As a replacement, we're introducing `spring.reactor.debug-agent.enabled`
which tells whether the Reactor Debug Agent should be loaded, given that
the `reactor-tools` dependency is available. This option is enabled by
default, since adding the dependency on classpath is a strong signal
already.

Fixes gh-17128
2019-07-10 12:06:26 +02:00
Johnny Lim 255469b82f Add Javadoc `@since` tags for new additional Tomcat connectors methods
See gh-17473
2019-07-10 06:32:16 +01:00
Andy Wilkinson be3a737532 Merge branch '2.1.x'
Closes gh-17470
2019-07-09 20:05:30 +01:00
Andy Wilkinson 6748b20863 Prevent JUL loggers from being GCed once their level has been set
Fixes gh-17217
2019-07-09 19:51:55 +01:00
Johnny Lim 426ef749db Polish
See gh-17413
2019-07-09 07:40:30 +02:00
Andy Wilkinson 638b4b8186 Rename methods to make copying behaviour more clear
Closes gh-17441
2019-07-05 19:09:19 +01:00
Andy Wilkinson 2816635418 Polish 2019-07-04 17:51:20 +01:00
Andy Wilkinson 4b2a116fa7 Use String indexOf(char) and lastIndexOf(char) where possible
Closes gh-11416
2019-07-04 17:44:40 +01:00
Phillip Webb 4483f41791 Don't validate using BeanPropertyBindingResult
Update `ValidationBindHandler` so that a custom `AbstractBindingResult`
is used rather than `BeanPropertyBindingResult`. This allows us to
validate results, regardless of whether the actual bound instance has
public getters or setter.

Closes gh-17424
2019-07-03 21:59:08 -07:00
Phillip Webb edea223841 Merge branch '2.1.x'
Closes gh-17422
2019-07-03 16:06:19 -07:00
Phillip Webb 2f88dd735e Polish 2019-07-03 15:52:51 -07:00
Phillip Webb cd5f40aec2 Validate onFailure returned binding results
Update `ValidationBindHandler` so that any non-null result returned by
the parent `onFailure` method triggers re-validation.

Fixes gh-17421
2019-07-03 15:52:51 -07:00
Phillip Webb d641a1e23a Polish BindHandler javaodc 2019-07-03 15:52:51 -07:00
Phillip Webb a66c4d3096 Unify method visibility of private classes
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.

Closes gh-7316
2019-07-03 11:39:47 -07:00
Andy Wilkinson 40f66c80f8 Merge branch '2.1.x'
Closes gh-17409
2019-07-02 17:34:25 +01:00
Andy Wilkinson 82fd4ce9b9 Fix empty context path warning when using Jetty with WebFlux
Previously, the context path was set to an empty string. The led to
Jetty logging a warning about an empty context path and then using
/ instead.

This commit avoids the warning while leaving the context path's end
result unchanged by setting the context path to /.

Closes gh-17399
2019-07-02 17:24:34 +01:00
Andy Wilkinson 73cf11535d Ensure that logging system tests do not leave log files open
See gh-17107
2019-07-02 16:03:30 +01:00
Phillip Webb 07acc4af08 Consistently coerce booleans to enums
Rename `StringToEnumIgnoringCaseConverterFactory` to
`LenientStringToEnumConverterFactory` and extended it to support
binding of YAML style 'true'/'false' values to 'ON'/'OFF'.

Closes gh-17385
2019-07-01 22:55:18 -07:00
Phillip Webb 46b250549d Merge branch '2.1.x'
Closes gh-17396
2019-07-01 21:52:20 -07:00
Phillip Webb 206ba2ad86 Append chars not ints in getLettersAndDigits
Update `StringToEnumIgnoringCaseConverterFactory` so that the
`getLettersAndDigits` method correctly appends `char` elements
rather than `int` elements.

Closes gh-17327
2019-07-01 21:49:29 -07:00
Phillip Webb c94a7dfa04 Allow binding to package private methods
Closes gh-17394
2019-07-01 18:44:35 -07:00
dreis2211 15d4764185 Avoid bindable properties check when target has null value
See gh-16447
2019-07-01 17:11:58 +01:00
陈其苗 f86cfff77f Remove redundant invocation of getActiveProfiles
See gh-17271
2019-07-01 17:06:12 +01:00
Andy Wilkinson df5d23ff6c Polish "Migrate LogbackLoggingSystemTests to JUnit 5"
See gh-17107
2019-06-29 23:20:47 +01:00
Ilya Lukyanovich 569830cdca Migrate LogbackLoggingSystemTests to JUnit 5
See gh-17107
2019-06-29 23:20:40 +01:00
Dmytro Nosan 011fea137e Allow multiple values to be specified when configuring a default header
See gh-17286
2019-06-29 23:06:39 +01:00
Andy Wilkinson 71b09e39ae Merge branch '2.1.x'
Closes gh-17370
2019-06-29 22:36:14 +01:00
Dmytro Nosan ae184874e9 Polish WebServiceTemplateBuilder
See gh-17289
2019-06-29 22:19:03 +01:00
Andy Wilkinson 13bbfb7ede Polish "Polish TomcatReactiveWebServerFactoryTests"
See gh-17336
2019-06-29 21:57:55 +01:00
Johnny Lim 0e7824cec1 Polish TomcatReactiveWebServerFactoryTests
See gh-17336
2019-06-29 21:56:19 +01:00
Andy Wilkinson e496203740 Merge branch '2.1.x'
Closes gh-17368
2019-06-29 21:19:13 +01:00
Johnny Lim 408035fb3f Remove System.out.println() in a test
See gh-17358
2019-06-29 21:18:44 +01:00
Andy Wilkinson ea7443bf01 Merge branch '2.1.x'
Closes gh-17367
2019-06-29 21:15:29 +01:00
Johnny Lim 8dea74a2e9 Add a missing quote in DebugLogbackConfigurator
See gh-17357
2019-06-29 21:14:42 +01:00
Phillip Webb 605599138e Merge branch '2.1.x' 2019-06-28 23:56:02 -07:00
Phillip Webb 92bff3c328 Merge branch '2.0.x' into 2.1.x 2019-06-28 23:42:28 -07:00
Phillip Webb cfeb0239b7 Merge branch '1.5.x' into 2.0.x 2019-06-28 23:28:34 -07:00
Phillip Webb a417e136a3 Merge branch '2.1.x' 2019-06-28 14:15:17 -07:00
Phillip Webb 9aa4887376 Merge branch '2.0.x' into 2.1.x 2019-06-28 14:14:52 -07:00
Phillip Webb ed3e1e076d Fix AbstractFilterRegistrationBean merge error
Merging 1.5.x accidentally broke `AbstractFilterRegistrationBean`
2019-06-28 14:13:59 -07:00
Phillip Webb c62b6b4ccd Merge branch '2.1.x' 2019-06-28 12:22:45 -07:00
Phillip Webb de35efd1ef Merge branch '2.0.x' into 2.1.x 2019-06-28 12:21:57 -07:00
Phillip Webb bb34846630 Merge branch '1.5.x' into 2.0.x 2019-06-28 12:19:46 -07:00
Andy Wilkinson 66f1344f7c Merge branch '2.1.x'
Closes gh-17335
Closes gh-17292
2019-06-27 12:00:34 +01:00
HaiTao Zhang d9048d2531 Provide ability to add additional connectors on reactive Tomcat
See gh-17323
2019-06-26 15:36:12 -07:00
Andy Wilkinson 7405efa326 Ensure that each Tomcat customizer is only called once
Fixes gh-17264
2019-06-21 17:53:24 +01:00
Stephane Nicoll e560b7f6ba Remove public modifier on JUnit5 lifecycle methods
See gh-17292
2019-06-21 18:09:05 +02:00
Phillip Webb 59ca46ed54 Remove FIXME 2019-06-18 21:41:05 -07:00
Phillip Webb f4d9e1c650 Fix checkstyle violation 2019-06-17 14:45:17 -07:00
Phillip Webb 69fbd8f20c Merge branch '2.1.x'
Closes gh-17227
Closes gh-17228
2019-06-17 11:53:16 -07:00
ayudovin c2d1cb2c70 Chain predicates in PropertyMapper when methods
Update `PropertyMapper` to correctly combine predicates when repeated
calls are made to `when` and `whenNot`. Prior to this commit, subsequent
invocations would replace the previous predicate.

Fixes gh-17225
2019-06-17 11:21:56 -07:00
Andy Wilkinson c62543b514 Merge branch '2.1.x'
Closes gh-17212
2019-06-17 10:47:22 +01:00
Andy Wilkinson 13a7a52c71 Revert "Work around Framework regression in handling of null model values"
This reverts commit 5fc67c545c.

Closes gh-16991
2019-06-17 10:44:23 +01:00
Phillip Webb 25839185c1 Fix checkstyle violation 2019-06-14 18:57:41 -07:00
Phillip Webb 0b3015e4ff Polish Binder classes
Polish and rename some of the internal Binder classes to better reflect
their purpose. The `BeanBinder` is now called `DataObjectBinder` and
as a `JavaBeanBinder` implementation for setter based properties, and
a `ValueObjectBinder` implementation for constructor based properties.
2019-06-14 18:14:40 -07:00
Madhura Bhave c6dae5764e Add bindOrCreate for constructor based binding
Deprecate the existing `BindResult.orElseCreate` method in favor of
`bindOrCreate` methods on the `Binder`. These new methods allow us to
implement custom creation logic depending on the type of object being
bound. Specifically, it allows constructor based binding to create new
instances that respect the `@DefaultValue` annotations.

Closes gh-17098

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
2019-06-14 18:14:40 -07:00
Andy Wilkinson 75da4468e5 Merge branch '2.1.x'
Closes gh-17192
2019-06-14 15:15:19 +01:00
Andy Wilkinson d5d96dff96 Honor logback.debug property and write Logback statuses to console
Closes gh-16876
2019-06-14 15:12:05 +01:00
Madhura Bhave 4c7e457582 Improve analysis of tomcat bind exception
Using the throwOnFailure attribute on the tomcat connector, we can now
determine if the underlying exception was a BindException and throw
a PortInUseException instead of the generic WebServerException.

Closes gh-7130
2019-06-13 15:11:18 -07:00
Phillip Webb 9db20313a1 Polish "Add Printer and Parser beans to conversion service"
Extract common registration code and make use of the Spring Framework
registration methods.

See gh-17064
2019-06-13 08:54:11 -07:00
Dmytro Nosan 955eaa87ae Add Printer and Parser beans to conversion service
Update `WebMvcAutoConfiguration` and `WebFluxAutoConfiguration` so that
`Printer<T>` and `Parser<T>` beans are automatically registered with
the conversion service.

Prior to this commit only `GenericConverter`, `Converter` and
`Formatter` beans were automatically registered.

See gh-17064
2019-06-13 08:54:11 -07:00
Andy Wilkinson cffc870fd6 Fix test failures on Windows
Since the move to JUnit 5, a number of tests were failing on Windows.
The majority were failing due to open file handles preventing the
clean up of the tests' temporary directory. This commit addresses
these failures by updating the tests to close JarFiles, InputStreams,
OutputStreams etc.

A change has also been made to CachingOperationInvokerTests to make
a flakey test more robust. Due to System.currentTimeMillis() being
less precise on Windows than it is on *nix platforms, the test could
fail as it would not sleep for long enough for the TTL period to have
expired.
2019-06-13 09:24:31 +01:00
Phillip Webb aad21d1996 Polish "Support default headers with RestTemplateBuilder"
Broaden the scope of customizer support so that instead of focusing
just on headers, we can now customize any outgoing `HttpClientRequest`.
Also update auto-configuration to automatically add any
`RestTemplateRequestCustomizer` beans to the builder.

See gh-17091
2019-06-12 16:34:31 -07:00
Ilya Lukyanovich 43b1a667ce Support default headers with RestTemplateBuilder
Update `RestTemplateBuilder` so that it is easier to apply custom
headers to the outgoing request. The update is particularly useful
for setting the `User-Agent` header, for example so that a GitHub
username can be used when calling `api.github.com`.

See gh-17091
2019-06-12 13:49:39 -07:00
Andy Wilkinson 5e3c86ab8d Merge branch '2.1.x'
Closes gh-17122
2019-06-12 12:53:49 +01:00
Andy Wilkinson 4222c5b8ce Prevent URLResource and JarURLConnection from leaking an InputStream
Fixes gh-17121
2019-06-12 12:53:16 +01:00
Andy Wilkinson 5375681fa5 Merge branch '2.1.x'
Closes gh-17120
2019-06-12 12:41:09 +01:00
Andy Wilkinson df9a6a0f4f Wait for up to 30s for access logs to be written during shutdown
Closes gh-17119
2019-06-12 12:40:11 +01:00
Madhura Bhave 6b3329b274 Add support for annotations on constructor parameter binding
Closes gh-17109
2019-06-11 16:46:29 -07:00
Andy Wilkinson e6151a6478 Polish 2019-06-11 18:57:58 +01:00
Phillip Webb 08dbb2d8c4 Polish 2019-06-11 09:23:50 -07:00
Johnny Lim 3b3a92c563 Add missing @Test annotations
This commit also restores assertion accidentally removed in
commit 44d832158a.

See gh-17069
2019-06-11 09:21:31 -07:00
Phillip Webb b3d5cd538d Add JUnit 5 checkstyle rules
Add a rule to enforce JUnit 5 usage and conventions.

Closes gh-17093
2019-06-10 16:16:45 -07:00
Phillip Webb 8d44e31898 Fix composite property source filtering
Update `ConfigFileApplicationListener` so that property filtering works
against the original `PropertySource`, rather than the underling `Map`.

Prior to this commit, it was impossible for a `CompositePropertySource`
to be used as the `defaultPropertySource`.

Closes gh-17011
2019-06-10 09:55:30 -07:00
Phillip Webb 266d6334b2 Fix checkstyle RedundantModifier test violations 2019-06-07 20:46:33 -07:00
Andy Wilkinson b18fffaf14 Move tests to JUnit 5 wherever possible 2019-06-07 12:25:54 +01:00
Andy Wilkinson aef92b9295 Merge branch '2.1.x'
Closes gh-17079
2019-06-07 11:00:44 +01:00
Andy Wilkinson 24925c3dae Merge branch '2.0.x' into 2.1.x
Closes gh-17078
2019-06-07 10:50:34 +01:00
Andy Wilkinson c6c139d980 Merge branch '1.5.x' into 2.0.x 2019-06-07 10:46:31 +01:00
Phillip Webb 3bfc9235df Polish "Optimize CacheKey handling for immutable sources"
Make immutable properties more explicit and trust that they
truly won't change.

See gh-16717
2019-06-04 16:26:48 -07:00
dreis2211 44d832158a Optimize CacheKey handling for immutable sources
Update `SpringIterableConfigurationPropertySource` so that cache keys
do not need to be checked if property sources are immutable.

See gh-16717
2019-06-04 16:26:43 -07:00
Phillip Webb db75347eb6 Merge branch '2.1.x' 2019-06-04 14:41:20 -07:00
Phillip Webb d306b31ce9 Merge branch '2.1.x' 2019-06-04 02:08:00 -07:00
Phillip Webb ccfbd03482 Merge branch '2.0.x' into 2.1.x 2019-06-04 02:07:14 -07:00
Phillip Webb b442d3b906 Merge branch '1.5.x' into 2.0.x 2019-06-04 01:49:03 -07:00
Phillip Webb 5fba43aa31 Merge branch '1.5.x' into 2.0.x 2019-06-04 00:05:57 -07:00
Phillip Webb af1a6d8649 Polish "Make it easier to set bufferRequestBody"
See gh-16972
2019-06-03 14:15:54 -07:00
kevinstrijbos 9f06514b89 Make it easier to set bufferRequestBody
Update `RestTemplateBuilder` to make it easier to set
the `bufferRequestBody` value on a underlying `ClientHttpRequestFactory`

See gh-16972
2019-06-03 14:14:34 -07:00
Stephane Nicoll 090cc05e7a Add missing metadata for "spring.profiles"
Closes gh-16107
2019-06-03 11:56:09 +02:00
Phillip Webb bf633fc575 Polish "Support JsonComponent key serializers/deserialzers"
See gh-16544
2019-06-02 20:46:17 -07:00
maly7 361efc7c11 Support JsonComponent key serializers/deserialzers
Update `@JsonComponent` so that it can also be used to register key
serializers and deserializers.

See gh-16544
2019-06-02 20:41:41 -07:00
Phillip Webb 763d18ca68 Polish defaultElementEquals
See gh-16671
2019-06-01 13:33:17 -07:00
Johnny Lim a89e6ff67c Polish dashIgnoringElementEquals()
See gh-16671
2019-06-01 13:33:08 -07:00
Phillip Webb 114f9f9503 Polish "Replace anonymous class with lambdas"
See gh-17040
2019-06-01 13:14:17 -07:00
fidel 46677e30cf Replace anonymous class with lambdas
See gh-17040
2019-06-01 12:49:38 -07:00
Phillip Webb 76e075ddd0 Polish "Use request factory to support Basic Authentication"
Reduce the surface area of the public API by making the
`BasicAuthentication` and `BasicAuthenticationClientHttpRequestFactory`
class package private.

This commit also attempts to simplify `TestRestTemplate` by keeping
the `RestTemplateBuilder` and reusing it, rather than needing to deal
only with a `RestTemplate` instance.

See gh-17010
2019-05-31 22:35:36 -07:00
Dmytro Nosan 18a0a7a2e8 Use request factory to support Basic Authentication
Update `RestTemplateBuilder` to use a custom request factory to add
authentication headers rather than an interceptor.

Prior to this commit, the use of the `BasicAuthenticationInterceptor`
interceptor could cause `OutOfMemoryError` whenever a large file is
uploaded.

See gh-17010
2019-05-31 22:29:20 -07:00
Phillip Webb d11d5ceb29 Split up JUnit 5 OutputCapture class
Split the JUnit 5 `OutputCapture` class into separate `OutputExtension`
and `CapturedOutput` classes. The JUnit 5 callback methods are now
contained only in the `OutputExtension` class so no longer pollute the
public API that users will interact with.

The `CapturedOutput` class has also been updated to capture System.err
and System.out separately to allow distinct assertions if required.

Closes gh-17029
2019-05-30 23:44:35 -07:00
Phillip Webb ad5e905bd7 Update copyright header of changed files 2019-05-30 11:30:43 -07:00
Phillip Webb 68aec8b6ee Polish 2019-05-30 11:30:27 -07:00
Phillip Webb 791be953fe Merge branch 'spring-projects/2.1.x'
Closes gh-17018
2019-05-29 16:11:52 -07:00
Phillip Webb 8e268987ff Improve thread safety in property source cache
Update `SpringIterableConfigurationPropertySource` so that they cache
and cache key are not stored in different fields. Prior to this commit
it was possible that the an incorrect cache could be returned from
because the key and cache were out of sync.

This commit also allows more lenient handling of ConcurrentModification
exceptions if they are thrown during cache retrieval.

Closes gh-17017
See gh-17013
2019-05-29 16:05:24 -07:00
Phillip Webb 6509322bd8 Merge branch '2.1.x'
Closes gh-17016
2019-05-29 14:36:34 -07:00
Johnny Lim f52ab0040f Handle all getters first in JavaBeanBinder
Update `JavaBeanBinder.addProperties` to add both `get` and `is` methods
before `set`.

See gh-17005
2019-05-29 11:15:41 -07:00
Andy Wilkinson e481eccd57 Merge branch '2.1.x'
Closes gh-17006
2019-05-29 14:19:57 +01:00
Johnny Lim 765b66c599 Add a missing @Test in JavaBeanBinderTests
See gh-17002
2019-05-29 14:17:41 +01:00
Andy Wilkinson 86380ab8db Add missing package-info.java files 2019-05-29 07:20:34 +01:00
Phillip Webb 6d413afecf Merge branch '2.1.x'
Closes gh-16995
2019-05-28 16:31:36 -07:00
Phillip Webb 09373622ca Polish "Allow Tomcat be destroyed regardless of exceptions"
See gh-16892
2019-05-28 16:15:26 -07:00
Joao Silva 2b33e31a7c Allow Tomcat be destroyed regardless of exceptions
Update `TomcatWebServer` so that lifecycle exceptions are silently
swallowed when attempting shutdown. Prior to this commit it was
possible that a Tomcat instance might not be properly destroyed and
could leave non daemon threads running, which prevent the JVM from
exiting.

Fixes gh-16892
2019-05-28 16:10:37 -07:00
Phillip Webb af1720aa2e Fix checkstyle issue 2019-05-28 15:52:00 -07:00
Phillip Webb 5fc67c545c Work around Framework regression in handling of null model values
See https://github.com/spring-projects/spring-framework/issues/23038.
2019-05-28 14:33:08 -07:00
Phillip Webb 89f8e187d5 Merge branch '2.1.x'
Closes gh-16988
2019-05-28 13:26:14 -07:00
Phillip Webb 07ebfc036b Polish 2019-05-28 13:17:56 -07:00
Johnny Lim e2f69d040a Use actual resolvedType when checking Binder cache
Update `JavaBeanBinder` so that the `isOfDifferentType` method checks
both the actual type and the resolved type. Prior to this commit, it
was possible that when `canCallGetValue` is `true` the `resolvedType`
could be different from `type.resolve`.

Closes gh-16974
2019-05-28 13:13:08 -07:00
Andy Wilkinson 0eb6c0ddd3 Defer disabling registry until Tomcat server is being created
Closes gh-16498
2019-05-28 20:49:07 +01:00
Andy Wilkinson 6de14f71c6 Fail fast if config prop constructor binding cannot determine names
Previously, configuration property constructor binding relied on compilation
with -parameters to be able to discover the names of a constructor's
parameters, failing silently if the parameter names were not available. This
commit updates it to fail when the names could not be determined and switches
to using DefaultParameterNamesDiscoverer. This align configuration property
constructor binding with actuator endpoint operation invocation.

Closes gh-16928
2019-05-28 15:47:39 +01:00
Andy Wilkinson 892e517c21 Work around Framework regression in handling of null model values
See https://github.com/spring-projects/spring-framework/issues/23038.
2019-05-28 10:05:59 +01:00
Andy Wilkinson d21a091262 Avoid duplicate retrieval of @ConfigurationProperties in registrar
Closes gh-15802
2019-05-28 09:00:29 +01:00
Stephane Nicoll 593bc22ecc Merge branch '2.1.x' 2019-05-27 16:59:32 +02:00
Stephane Nicoll 2c364ceb89 Fix wrong ApplicationContext import
Closes gh-16978
2019-05-27 16:59:12 +02:00
Brian Clozel 0b70862627 Fix RSocket websocket config with WebFlux
In the case of a WebFlux + RSocket over websocket setup, the RSocket
auto-configuration would not set up the required routes; only the
websocket endpoint for RSocket would be available, overriding the
handler configured for WebFlux.

This commit introduces `NettyRouteProvider`. Components implementing
that interface can contribute HTTP routes to the Reactor Netty server
being built.

* if none is provided, the regular handler setup is used
* if one or more routes are provided, routes are sorted and added before
the WebFlux handler (acting as a default)

Fixes gh-16826
2019-05-27 15:19:32 +02:00
Andy Wilkinson 5e62faf720 Handle null CodeSource when determining Spring Boot version
Closes gh-16956
See gh-16182
2019-05-24 09:41:23 +01:00
Andy Wilkinson 23f803c6b6 Upgrade to Hamcrest 2.1, switch to hamcrest artifact from -core and -library
Closes gh-15555
2019-05-22 14:50:15 +01:00
Andy Wilkinson 9ba5c78878 Merge branch '2.1.x'
Closes gh-16940
2019-05-22 13:00:24 +01:00
Andy Wilkinson 46ecf7a928 Only unwrap when DataSource is a wrapper for required type
Closes gh-16863
2019-05-22 12:52:10 +01:00
Stephane Nicoll ffbc545a47 Change Logback's maxHistory property default to 7 days
Closes gh-15875
2019-05-21 10:55:30 +02:00
Andy Wilkinson f8eb230dea Ignore Redshift in DatabaseDriverClassNameTests
Closes gh-16831
2019-05-20 17:18:23 +01:00
Stephane Nicoll 9e31c764fc Polish "Add support for AWS Redshift JDBC driver"
Closes gh-16831
2019-05-20 14:23:44 +02:00
Henryk Konsek 146f35d2bd Add support for AWS Redshift JDBC driver
See gh-16831
2019-05-20 14:06:23 +02:00
Phillip Webb 10e67f8977 Fix dashIgnoringElementEquals algorithm
Update `dashIgnoringElementEquals` so that trailing checks fail if
the last characters are not all `-`.

Fixes gh-16855
2019-05-14 22:44:07 -07:00
Phillip Webb 3a9ca5fa30 Update copyright header of changed files 2019-05-14 21:05:53 -07:00
Phillip Webb c49b9bece5 Merge branch '2.1.x'
Closes gh-16859
2019-05-14 21:03:55 -07:00
Phillip Webb ab15b8e26d Support overloaded setters when binding beans
Update `JavaBeanBinder` so that overloaded setters can be used when
binding. Prior to this commit the setter picked would depend on the
order that the JVM returned the declared methods. We now consistently
prefer using the setter with a parameter type that matches the getter.

Closes gh-16206
2019-05-14 21:02:16 -07:00
Phillip Webb e03f3b8e9a Merge branch '2.1.x'
Closes gh-16857
2019-05-14 18:51:46 -07:00
Phillip Webb f665910cdb Use generic type for binder cache comparisons
Update `JavaBeanBinder` so that previously cached beans are compared
using full generic type information. Prior to this commit binding would
fail if a class with the same resolved type, but different generics was
in the cache.

Fixes gh-16821
2019-05-14 18:42:16 -07:00
Brian Clozel 20dfeddbb3 Auto-configure RSocketRequester.Builder
This commit auto-configures a prototype `RSocketRequester.Builder` bean
for building requester instances. This builder is pre-configured with
auto-detected `RSocketStrategies` (same as the server side).

Closes gh-16280
2019-05-13 16:03:21 +02:00
Brian Clozel 9f2995af6f Migrate from deprecated Jetty's SslContextFactory
Closes gh-16827
2019-05-13 10:27:20 +02:00
Madhura Bhave f1786c357b Revert "Disable ConfigurationProperties scanning for slice tests"
This reverts commit 3b4ff7d746.
The commit caused the build to fail because it disabled
`@ConfigurationPropertiesScan` completely in slice tests. It
did not take into account components that were explicitly included
in slice tests using the `components` attribute. Since `@ConfigurationPropertiesScan`
replaces `@Component` and `@EnableConfigurationProperties`, these components
are no longer registered even though explicitly included.
2019-05-11 09:59:36 -07:00
Madhura Bhave 3b4ff7d746 Disable ConfigurationProperties scanning for slice tests
Closes gh-16659
2019-05-10 14:43:55 -07:00
Stephane Nicoll c85c653e57 Polish "Add negative tests to ConfigurationPropertiesScanTests"
Closes gh-16758
2019-05-10 10:22:34 +02:00
Johnny Lim d44ffd3534 Add negative tests to ConfigurationPropertiesScanTests
See gh-16758
2019-05-10 10:22:08 +02:00
Stephane Nicoll f056b952d9 Merge branch '2.1.x' 2019-05-02 09:18:21 +02:00
Johnny Lim 1b9a4d5e45 Polish CompressionConnectorCustomizerTests
Closes gh-16699
2019-05-02 09:13:47 +02:00
Stephane Nicoll ed538a2e31 Merge branch '2.1.x' 2019-05-01 08:41:27 +02:00
Stephane Nicoll 19413c0c71 Polish
See gh-16688
2019-05-01 08:41:07 +02:00
Madhura Bhave fd97066604 Use MergedAnnotation.getRoot() method
Closes gh-16661
2019-04-30 16:19:18 -07:00
Maciej Walkowiak d7722e328a Add jOOQ to SQL logging group
See gh-16678
2019-04-30 08:55:07 +02:00
Madhura Bhave a0d425332d Use ImportBeanDefintionRegistrar directly instead of import selector
Closes gh-16679
2019-04-29 18:01:31 -07:00
dreis2211 cf05959375 Optimize ConfigurationPropertyName.buildToString()
See gh-16658
2019-04-25 17:18:55 +01:00
Phillip Webb 1e44aba772 Fix compiler warnings and polish
Fix various compiler warnings and apply a little polish.
2019-04-24 19:37:42 -07:00
Andy Wilkinson b39fdea508 Merge pull request #16474 from Christoph Dreis
* gh-16474:
  Speed up element equality checks in ConfigurationPropertyName

Closes gh-16474
2019-04-24 14:00:46 +01:00
dreis2211 3786dbc869 Speed up element equality checks in ConfigurationPropertyName
See gh-16474
2019-04-24 13:59:53 +01:00
Madhura Bhave 5c2a7e61d0 Fix tests 2019-04-22 22:40:11 -07:00
Madhura Bhave 9fb65e57c0 ConfigurationPropertiesScan should account for conditions
Fixes gh-16612
2019-04-22 18:37:29 -07:00
Stephane Nicoll fd14cd0bd0 Merge branch '2.1.x' 2019-04-22 10:00:28 +02:00
Stephane Nicoll 1f656e75fc Polish "Fix UndertowWebServer's logger name"
Closes gh-16613
2019-04-22 09:59:24 +02:00
liaozan 360da66333 Fix UndertowWebServer's logger name
See gh-16613
2019-04-22 09:58:59 +02:00
ForeverHex 124d969b2d Fix checkstyle violation
Closes gh-16616
2019-04-21 20:28:16 +02:00
Phillip Webb 1f893d9376 Log warning on slow host resolution
Update `StartupInfoLogger` so that if the `InetAddress` call takes
more than 200ms a warning is logged.

Closes gh-7087
2019-04-19 15:11:22 -07:00
Phillip Webb 405135d5a8 Polish StartupInfoLogger message creation
Rework some of the internals of `StartupInfoLogger` so that fewer
strings are created.
2019-04-19 15:11:22 -07:00
Madhura Bhave ba196b47ac Fix failure analyzer message
See gh-16581
2019-04-19 09:37:31 -07:00
Stephane Nicoll e9447b0dbf Merge branch '2.1.x' 2019-04-19 16:31:34 +02:00
Stephane Nicoll 2448efc028 Polish "Cache MimeTypes to improve performance"
Closes gh-16507
2019-04-19 16:30:54 +02:00
wenqi.huang b3f94c47d9 Cache MimeTypes to improve performance
See gh-16507
2019-04-19 16:29:32 +02:00
Johnny Lim 62549ffb49 Polish
Closes gh-16597
2019-04-19 10:02:46 +02:00
Phillip Webb b879972d0d Migrate to MergedAnnotations API
Migrate away from `AnnotationUtils` and `AnnotatedElementUtils`
when possible to the new `MergedAnnotations` API.

Closes gh-16551
2019-04-18 15:40:02 -07:00
Madhura Bhave eda14fb0f6 Analyze failure if configprop scanning results in two beans
Closes gh-16581
2019-04-18 11:43:53 -07:00
Andy Wilkinson 15f28dcc68 Polish "Determine Spring Boot version correctly when using module path"
See gh-16182
2019-04-18 15:09:17 +01:00
Hendrig Sellik ec8fb614f7 Determine Spring Boot version correctly when using module path
In Java 9, a package may return null for its implementation version
even when the manifest attribute specifying the version is present
in the jar from which the package was loaded.

This commit updates SpringBootVersion to fall back to
accessing the jar and its manifest attributes directly when the
implementation version of its package is null.

See gh-16182
2019-04-18 15:09:11 +01:00
Stephane Nicoll a79e49f1dd Merge branch '2.1.x' 2019-04-17 11:57:32 +02:00
Johnny Lim 363994515b Polish
See gh-16575
2019-04-17 11:56:31 +02:00
Phillip Webb 5f1bbf8c72 Update copyright header of changed files 2019-04-15 17:51:08 -07:00
Phillip Webb 2dfd916c96 Polish 2019-04-15 17:51:08 -07:00
Madhura Bhave 08260388bf Merge branch '2.1.x' 2019-04-15 16:30:07 -07:00
Rudy Adams 0aa25fb742 Add tests for CompressionConnectorCustomizer
Closes gh-16515
2019-04-15 16:17:29 -07:00
Brian Clozel 71362299ae Polish RSocket server bootstrap
See gh-16021
2019-04-15 21:42:21 +02:00
Brian Clozel 9eb7260699 Polish RSocket server support
Relax the `NettyRSocketBootstrap` contract to allow all types of
`SocketAcceptor` implementations.

See gh-16021
2019-04-11 20:52:49 +02:00
Brian Clozel 2112e02eda Polish
Closes gh-15952
2019-04-11 19:07:14 +02:00
Dmytro Nosan 2c20d01e25 Add requestId info to ErrorAttributes in WebFlux
See gh-15952
2019-04-11 19:06:52 +02:00
Brian Clozel b33944b53f Add RSocket server support with Spring Messaging
This commit adds support for RSocket server applications.
The auto-configuration will either add RSocket support to an existing
Reactor Netty server in a WebFlux application (as a WebSocket endpoint),
or bootstrap a brand new RSocket server instance.

Spring Boot will also auto-configure the Spring Messaging infrastructure
that supports Controller beans with `@MessageMapping` annotated methods.

Fixes gh-16021
2019-04-11 15:44:17 +02:00
Madhura Bhave ce0282406f Skip lazy init for beans that explicitly set lazy to false
This commit also adds tests to ensure that the child
management context works when lazy initialization is
enabled. Also, it adds a BeanFactoryPostProcessor to
the child context so that the server is created and
listening for requests but other beans in the child
context are not created until requested.

See gh-16184
2019-04-05 18:02:26 -07:00
Phillip Webb 8626a33bbb Polish "Migrate ApplicationContext to common hierarchy"
Users calling the methods will still face problems but at least they
will have some guidance.

Closes gh-16096
2019-04-05 14:17:49 +02:00
Stephane Nicoll c432288ed1 Migrate ApplicationContext to common hierarchy
This commit migrates `AnnotationConfigReactiveWebApplicationContext`
parent to the `GenericApplicationContext` abstraction. Any use of
`AnnotationConfigWebApplicationContext` is also removed as it also
inherits from the `AbstractRefreshableApplicationContext` outdated
hierarchy.

A new `AnnotationConfigServletWebApplicationContext` context is
introduced instead, extending from `GenericApplicationContext` and
providing the counter part of the reactive context for the Servlet-based
web app tests.

See gh-16096
2019-04-05 14:17:41 +02:00
Stephane Nicoll dbf8245c1d Polish "Polish embedded tomcat setup"
Closes gh-16446
2019-04-05 08:44:54 +02:00
Rudy Adams 06028f83b2 Polish embedded tomcat setup
See gh-16446
2019-04-05 08:44:54 +02:00
Madhura Bhave 7587af343d Merge pull request #16342 Pascal Zwick
* pr/16342:
  Polish "Simplify the configuration of the ProtocolHandler"
  Simplify the configuration of the ProtocolHandler
2019-04-04 12:41:15 -07:00
Madhura Bhave ad767ca4e1 Polish "Simplify the configuration of the ProtocolHandler"
Closes gh-16342
2019-04-04 12:41:05 -07:00
Pascal Zwick 2eaa64f82e Simplify the configuration of the ProtocolHandler
This commit introduces a new callback interface that can
be used to customize the ProtocolHandler on a Tomcat Connector.

See gh-16342
2019-04-04 12:24:47 -07:00
Stephane Nicoll 763c1a99e0 Polish 2019-04-04 11:01:10 +02:00
Phillip Webb ad7eebee9e Merge branch '2.1.x' 2019-04-03 17:00:25 -07:00
Phillip Webb f12ab1ff90 Update copyright header of changed files 2019-04-03 16:13:00 -07:00
Phillip Webb 34fee1adfa Polish 2019-04-03 16:12:37 -07:00
Phillip Webb 2376f973f4 Merge branch '2.1.x' 2019-04-02 13:46:36 -07:00
Phillip Webb 47c6bf741d Merge branch '2.0.x' into 2.1.x 2019-04-02 13:40:21 -07:00
Phillip Webb 07c000c5b7 Merge branch '1.5.x' into 2.0.x 2019-04-02 13:34:28 -07:00
mmitropolitsky deaf5fa433 Replace ${sys:PID} with %pid in log4j2 configuration
Replacing property sys:PID which was set in the code with the default
log4j2 Pattern in log4j2.xml and log4j2-file.xml files.

Closes gh-16174
2019-04-02 17:07:54 +02:00
Stephane Nicoll 57cad53ea9 Adapt to latest API change 2019-04-02 15:17:23 +02:00
Andy Wilkinson 512fbae715 Merge branch '2.1.x' 2019-04-02 10:47:30 +01:00
Andy Wilkinson 22c9364237 Only use AprLifecycleListener when native library is available
Closes gh-16040
2019-04-02 10:47:24 +01:00
Andy Wilkinson 6615e11e65 Merge branch '2.1.x' 2019-03-29 16:12:40 +00:00
Andy Wilkinson 4e734669fe Merge branch '2.0.x' into 2.1.x 2019-03-29 16:12:27 +00:00
Andy Wilkinson 7990c8ba68 Merge branch '1.5.x' into 2.0.x 2019-03-29 16:06:47 +00:00
Stephane Nicoll d7d2c345c1 Merge branch '2.1.x' 2019-03-29 15:58:00 +01:00
Stephane Nicoll b894696efb Polish "Automatically detect log4j2.properties"
Closes gh-16262
2019-03-29 15:57:06 +01:00
Mohamed Rifni 2cb4403cd0 Automatically detect log4j2.properties
See gh-16262
2019-03-29 15:55:49 +01:00
Andy Wilkinson 5e22b421c5 Merge branch '2.1.x' 2019-03-29 11:14:06 +00:00
Andy Wilkinson 6aa78801ff Merge branch '2.0.x' into 2.1.x 2019-03-29 11:13:53 +00:00
Andy Wilkinson 6507d1723d Merge branch '1.5.x' into 2.0.x 2019-03-29 11:02:56 +00:00
Johnny Lim 40d0d6b113 Polish
Closes gh-16299
2019-03-28 16:42:27 +01:00
Andy Wilkinson 878a635bfb Merge branch '2.1.x' 2019-03-28 11:48:47 +00:00
Andy Wilkinson 864942ad4f Merge branch '2.0.x' into 2.1.x 2019-03-28 09:35:53 +00:00
Andy Wilkinson 14b21026bf Polish "Use HTTPS for external links wherever possible"
See gh-16319
2019-03-28 09:17:50 +00:00
Spring Operator 1a4c6f2dac Use HTTPS for external links wherever possible
See gh-16319
2019-03-27 20:06:52 +00:00
Andy Wilkinson ba4671f0ab Merge branch '1.5.x' into 2.0.x 2019-03-27 19:59:36 +00:00
Andy Wilkinson 4900505425 Merge branch '2.0.x' into 2.1.x 2019-03-26 13:53:57 +00:00
Andy Wilkinson fedb40a2bf Merge branch '1.5.x' into 2.0.x 2019-03-26 13:48:32 +00:00
Madhura Bhave 5bd2b349bc Merge branch '2.1.x' 2019-03-25 16:04:22 -07:00
Madhura Bhave 91c1fc3d97 Ignore unbound collection properties if collection bound
As of Spring Boot 2.0, if Collection properties are specified in
multiple property sources, only the elements from the property source
with the highest precedence are used for binding. This caused an
`UnboundConfigurationPropertiesException` if the size of the collection
from the higher order property source was smaller and `ignoreUnknownFields`
was set to true.

This commit ignores unbound collection properties if the
collection was properly bound.

Fixes gh-16290
2019-03-25 16:03:33 -07:00
Stephane Nicoll 197e1669e2 Polish 2019-03-25 09:01:13 +01:00
Madhura Bhave 8f693a0277 Add support for configuration properties scanning
See gh-12602
2019-03-21 13:30:44 -07:00
Andy Wilkinson 41967fc629 Correct the URI used for the properties DTD
See gh-16270
2019-03-20 17:48:33 +00:00
Andy Wilkinson 36c1c051b8 Merge branch '2.1.x' 2019-03-20 16:55:10 +00:00
Andy Wilkinson e23f72c8b0 Merge branch '2.0.x' into 2.1.x 2019-03-20 16:53:48 +00:00
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 2019-03-20 16:45:26 +00:00
Spring Operator 00ab30362c Use HTTPS for external links in XML files
See gh-16270
2019-03-20 14:33:25 +00:00
Andy Wilkinson b828b398b5 Merge branch '2.1.x' 2019-03-19 17:11:45 +00:00
Andy Wilkinson a36aa67b52 Merge branch '2.0.x' into 2.1.x 2019-03-19 17:04:41 +00:00
Spring Operator 3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
2019-03-19 16:58:31 +00:00
Stephane Nicoll 09ad80b3d9 Merge branch '2.1.x' 2019-03-16 08:27:45 +01:00
Stephane Nicoll 372802a203 Polish "Order the search locations in javadoc by precedence order"
Closes gh-16099
2019-03-16 08:23:57 +01:00
Muhammad Hewedy 4bac6c6688 Order the search locations in javadoc by precedence order
See gh-16099
2019-03-16 08:23:01 +01:00
Stephane Nicoll d625025051 Polish "Add default no-op method to SpringApplicationRunListener"
Closes gh-16104
2019-03-16 08:05:52 +01:00
ayudovin 997f07d13f Add default no-op method to SpringApplicationRunListener
See gh-16104
2019-03-16 08:05:32 +01:00
Madhura Bhave 3d0219c315 Merge branch '2.1.x' 2019-03-15 18:09:47 -07:00
Johnny Lim c5b5f752ed Polish
Closes gh-16219
2019-03-15 17:54:48 -07:00
Stephane Nicoll adaa49c0df Polish
See gh-8762
2019-03-15 12:16:05 +01:00
Stephane Nicoll de21d71e20 Remove support of `@Autowired` for configuration properties bean
See gh-8762
2019-03-14 11:16:22 +01:00
Andy Wilkinson 0872eb0dd9 Remove use of ReflectionUtils.doWithMethods from ConfigurationBeanFactoryMetadata
Closes gh-16220
2019-03-13 18:34:45 +00:00
Stephane Nicoll 9da20b7e52 Merge branch '2.1.x' 2019-03-13 17:51:38 +01:00
Ruslan Stelmachenko fcde648c50 Fix typo in logging.group property description
Closes gh-16224
2019-03-13 17:47:51 +01:00
Andy Wilkinson ae3ea186e2 Align test with change to exception in latest Framework snapshots 2019-03-13 14:22:40 +00:00
Brian Clozel 8866a25ef7 Polish Undertow tests 2019-03-13 11:55:53 +01:00
Andy Wilkinson 68bfb020aa Reduce need for bean method proxying and disable where not needed
Closes gh-9068
2019-03-12 13:18:42 +00:00
Stephane Nicoll 8ff0a9c5a9 Merge branch '2.1.x' 2019-03-12 10:51:08 +01:00
Johnny Lim bcfbabe6cd Polish
Closes gh-16193
2019-03-12 10:50:32 +01:00
Andy Wilkinson 4b98fa7d94 Alias proxyBeanMethods on annotations meta-annotated with @Configuration
Closes gh-16201
2019-03-12 09:24:20 +00:00
Phillip Webb 64a2e8d67f Update copyright year for changed files 2019-03-11 22:15:36 -07:00
Phillip Webb dd3e8154d9 Merge branch '2.1.x' 2019-03-11 22:15:19 -07:00
Phillip Webb fc3aa43cc2 Update copyright year for changed files 2019-03-11 22:14:53 -07:00
Madhura Bhave d92c2f7023 DefaultProperties profiles shouldn't take precedence over config files
Fixes gh-15445
2019-03-11 16:17:46 -07:00
Andy Wilkinson aa2008bc5a Merge branch '2.1.x' 2019-03-11 16:40:19 +00:00
Stephane Nicoll 09d51089ba Polish 2019-03-11 17:24:52 +01:00
Stephane Nicoll fd0a11b7a7 Reuse Kotlin parameter names if possible
This commit detects a Kotlin constructor so that it is not required to
transmit the parameter names information to the Java side.

See gh-8762
2019-03-11 17:23:45 +01:00
Andy Wilkinson 8c3cec8f13 Merge branch '2.0.x' into 2.1.x 2019-03-11 16:14:19 +00:00
Andy Wilkinson 361437f4e2 Merge branch '1.5.x' into 2.0.x 2019-03-11 15:53:34 +00:00
Stephane Nicoll 341859b5fe Start building against Spring Framework 5.2 snapshots
See gh-16173
2019-03-11 15:22:14 +01:00
Stephane Nicoll c30f9815c1 Fix detection of Autowired constructor with Kotlin
Previously, the import selector wrongly assumed that we should not
use constructor injection with Kotlin. Rather than looking up for the
primary constructor, we retrieve available constructors on the Java
counter-part.

This commit applies the same logic as in the constructor parameter
binder and checks for the primary constructor for Kotlin types.

See gh-8762
2019-03-11 10:19:25 +01:00
Andy Wilkinson 7d0317419d Polish 2019-03-10 12:42:09 +00:00
Stephane Nicoll d07a6ff0bb Fix binding of bean with no bean definition
See gh-16180
2019-03-09 20:49:47 +01:00
Stephane Nicoll 430571b37b Perform binding at creation time if possible
Previously, environment binding always happened in a post processor once
the bean has been created. Constructor binding requires to perform the
binding at creating time so this commit performs binding at creation
time if possible.

When this happens, a special `ConfigurationPropertiesBeanDefinition` is
created with a supplier that invokes the binder. To avoid a case where
a bean is processed twice, the post-processor now ignores any bean that
has already been bound to the environment.

Closes gh-8762

Co-authored-by: Madhura Bhave <mbhave@pivotal.io>
2019-03-08 15:50:44 +01:00
Madhura Bhave 7ca589d43c Add constructor based binding support
See gh-8762

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
2019-03-08 15:50:44 +01:00
Andy Wilkinson b8dff5fe17 Merge branch '2.1.x' 2019-03-07 10:20:29 +00:00
Andy Wilkinson c4756e9057 Merge branch '2.1.x' 2019-03-07 09:43:16 +00:00
Andy Wilkinson f46894dfd3 Merge branch '2.0.x' into 2.1.x 2019-03-07 09:43:02 +00:00
Andy Wilkinson 17a1b2822c Isolate LoggerContext state to each test
Closes gh-16162
2019-03-07 09:37:41 +00:00
Andy Wilkinson 3f3966adb0 Merge branch '2.1.x' 2019-03-07 09:25:45 +00:00
Andy Wilkinson 9963ed1249 Merge branch '2.0.x' into 2.1.x 2019-03-07 09:25:31 +00:00
Andy Wilkinson 83216c34e5 Merge branch '1.5.x' into 2.0.x 2019-03-07 09:25:17 +00:00
Andy Wilkinson 87d696d697 Align with breaking API change in AssertJ 3.12
Closes gh-16145
2019-03-06 14:38:17 +00:00
Andy Wilkinson d6a869fa98 Switch to Jakarta EE API dependencies where possible
Closes gh-16113
Closes gh-16112
Closes gh-16111
Closes gh-15916
Closes gh-15689
2019-03-06 11:20:51 +00:00
Johnny Lim 4a738e3c49 Polish
Closes gh-16094
2019-03-05 08:19:29 +01:00
Stephane Nicoll 7b8563a877 Merge branch '2.1.x' 2019-03-04 09:29:13 +01:00
Stephane Nicoll 235fbfb4b6 Polish "Use AssertJ facilities for expected exceptions"
Closes gh-16066
2019-03-04 08:58:28 +01:00
dreis2211 be445f6346 Use AssertJ facilities for expected exceptions
See gh-16066
2019-03-04 08:45:42 +01:00
Stephane Nicoll 3bcd93bd35 Merge branch '2.1.x' 2019-02-28 14:44:27 +01:00
Stephane Nicoll 2a6791aa20 Polish "Add `jaxb-runtime` to TldSkipPatterns"
Closes gh-16027
2019-02-28 14:39:52 +01:00
Rupert Madden-Abbott 946ada62fb Add `jaxb-runtime` to TldSkipPatterns
See gh-16027
2019-02-28 14:37:45 +01:00
Stephane Nicoll 7beb64043d Fix build failure 2019-02-27 13:55:28 +01:00
Stephane Nicoll 7f817e339b Merge branch '2.1.x' 2019-02-27 13:45:26 +01:00
Stephane Nicoll 978f80122b Polish "Debug mode is not logging web and sql related loggers"
Closes gh-16018
2019-02-27 13:37:18 +01:00
Dmytro Nosan c3430d5883 Debug mode is not logging web and sql related loggers
See gh-16018
2019-02-27 13:25:08 +01:00
Stephane Nicoll 715db153e3 Polish "Remove code deprecated in 2.1"
Closes gh-16013
2019-02-27 11:15:48 +01:00
Mehmed Baždar 246111cd84 Remove code deprecated in 2.1
See gh-16013
2019-02-27 10:08:48 +01:00
dreis2211 2ab4ce03db Fix deprecations
Closes gh-16037
2019-02-26 16:49:13 +01:00
Madhura Bhave adea7014a9 Add support to detect Kubernetes platform in CloudPlatform
Closes gh-15537
2019-02-21 15:27:23 -08:00
Andy Wilkinson f2e3e274a8 Merge branch '2.1.x' 2019-02-21 08:19:43 +00:00
Andy Wilkinson 52aa7e1e09 Include source of NoSuchMethodError in its failure analysis
Closes gh-15995
2019-02-19 12:38:21 +00:00
Andy Wilkinson 51776af45d Include source of NoSuchMethodError in its failure analysis
Closes gh-15995
2019-02-19 12:34:52 +00:00
Stephane Nicoll eee07efee1 Switch Logback's file size properties to DataSize
This commit changes the target type of file size-based properties to
`DataSize` and tolerates Logback's specific format.

Closes gh-15930
2019-02-19 11:16:31 +01:00
Stephane Nicoll fa49dfcaaf Add support for task scheduling shutdown related properties
See gh-15951
2019-02-18 21:13:32 +01:00
Stephane Nicoll d2cbf08f09 Polish "Add support for task executor shutdown related properties"
Closes gh-15951
2019-02-18 21:13:32 +01:00
Filip Hrisafov 3b47ba21a8 Add support for task executor shutdown related properties
See gh-15951
2019-02-18 21:13:32 +01:00
Stephane Nicoll ff6ef1e55d Merge branch '2.1.x' 2019-02-18 16:49:42 +01:00
Stephane Nicoll 20c39dc554 Document missing keys mapped on third party types
Closes gh-15980
2019-02-18 16:48:51 +01:00
Andy Wilkinson 3a4a431eaa Provide a configuration option to enable lazy initialization
Closes gh-15870
2019-02-14 12:41:49 +00:00
Stephane Nicoll f42cec9eac Polish "Support for capping archived log files"
Closes gh-15325
2019-02-12 16:31:58 +01:00
Robert Thornton 999780f342 Support for capping archived log files
See gh-15325
2019-02-12 16:31:58 +01:00
Stephane Nicoll 82f33adba5 Polish "Add support for jdbc:firebird: url prefix"
Closes gh-15841
2019-02-12 10:32:44 +01:00
Mark Rotteveel 2ab7ece36d Add support for jdbc:firebird: url prefix
See gh-15841
2019-02-12 10:32:44 +01:00
dreis2211 3fb87a4506 Clean up SpringPropertyAction.getValue()
See gh-15885
2019-02-11 16:58:40 +00:00
Andy Wilkinson d9ec48ef12 Merge branch '2.1.x' 2019-02-11 16:13:52 +00:00
Andy Wilkinson 3f32fbd0de Polish "Remove unwanted @Nullable annotations"
See gh-15876
2019-02-11 16:11:40 +00:00
wonwoo 2855321074 Remove unwanted @Nullable annotations
See gh-15876
2019-02-11 16:07:29 +00:00
Kedar Joshi 4a253ff87c Polish
1. Removed unnecessary null checks
2. Combined collection initialization and modification
3. Minor collections related optimizations

Closes gh-15837
2019-02-10 10:35:36 +01:00
Brian Clozel 8bcbcf6c27 Merge branch '2.1.x' 2019-02-08 19:48:49 +01:00
Brian Clozel c24f02696f Upgrade to Californium-BUILD-SNAPSHOT
See gh-15878
2019-02-08 19:45:24 +01:00
Madhura Bhave 8528f7c140 Make spring.profiles.include behave consistently
Previously, if profiles were included via a property source with higher
precedence than config files, profiles activated via config files would
not be taken into account. This commit makes spring.profiles.include
behave consistently where it adds to active profiles rather than replacing
them, regardless of property source.

Fixes gh-15344
2019-02-08 10:28:52 -08:00
Stephane Nicoll 380d7ec01c Merge branch '2.1.x' 2019-02-08 09:21:06 +01:00
Johnny Lim 885c28891b Polish
Closes gh-15873
2019-02-08 09:20:15 +01:00
Stephane Nicoll b169406bbe Polish contribution
Closes gh-15853
2019-02-06 09:14:06 +01:00
Kedar Joshi b43718c360 Polish
See gh-15853
2019-02-06 09:13:53 +01:00
Andy Wilkinson 45cc649c7d Merge branch '2.1.x' 2019-02-04 12:36:33 +00:00
Andy Wilkinson 82bc87560c Use AssertJ’s exception assertions rather than fail
Closes gh-15761
2019-02-04 11:48:26 +00:00
dreis2211 5b3e1aa21a Optimize ConfigurationPropertyName
This commit changes the iteration order when checking for element
equality. This is based on the educated guess that child elements
will likely differ while parents will probably be the same.

E.g. comparing "spring.banner.charset" with "spring.banner.location"
will now first check "charset" against "location" and thus saves some
cycles for elements that will be the same.

See gh-15782
2019-01-28 11:39:40 +00:00
Andy Wilkinson 0e77445a9a Polish "Optimize BeanPropertyName.toDashedForm()"
See gh-15779
2019-01-28 11:37:55 +00:00
dreis2211 3c8d9d00e5 Optimize BeanPropertyName.toDashedForm()
See gh-15779
2019-01-28 11:37:49 +00:00
Andy Wilkinson 47b378e373 Derive StringBuilder's size from number of elements
Previously, when ConfigurationPropertyName was building the String
returned from toString() it would use a StringBuilder with the
default initial capacity of 16. For properties with several
elements this was likely to be too small resulting in the builder's
buffer being resized.

This commit sizes the StringBuilder as a multiple of the number of
elements in the name, attempting to strike a balance between
allocating a StringBuilder with an initial capacity that's too
large and wastes memory and an initial capacity that's too small
and requires resizing.

See gh-15760
2019-01-28 11:34:28 +00:00
Andy Wilkinson 39e2aaa41c Size the ElementsParser based on expected number of elements
Previously, the ElementsParser would be created using its default
capacity of 6 even when parsing a String that is expected to
produce a single element.

This commit updates ConfigurationPropertyName to create an
ElementsParser with a capacity of 1 when parsing a String that should
contain only a single element.

See gh-15760
2019-01-28 11:34:28 +00:00
Andy Wilkinson 8ec6c372e4 Do not expand ElementsParser until size equals storage length
Previously, ElementsParser would expand its internal storage when the
size of the storage was <= the end index of the element being parsed,
irrespective of how many elements had been stored. This led to
expansion of the storage, even for a source that contains a single
element, if the end of the element was at an index greater than the
size of the storage.

This commit updates ElementsParser to resize its storage when the size
(the number of elements that have been stored) is equal to the size of
the storage.

See gh-15760
2019-01-28 11:34:28 +00:00
Andy Wilkinson 2956b86035 Avoid creating ConfigurationPropertyName just to get its Elements
See gh-15760
2019-01-28 11:34:28 +00:00
dreis2211 d4ab101223 Use Assertions.contentOf() where possible
Closes gh-15793
2019-01-28 10:08:57 +01:00
Andy Wilkinson babe98f064 Merge branch '2.1.x' 2019-01-22 11:54:05 +00:00
Andy Wilkinson a172e146de Polish "Always fail fast when SSL is enabled without a key store"
Closes gh-15709
2019-01-22 11:51:29 +00:00
Raheela 62c8ac6ee8 Always fail fast when SSL is enabled without a key store
See gh-15709
2019-01-22 11:50:19 +00:00
Stephane Nicoll 33f2bd4d61 Merge branch '2.1.x' 2019-01-14 08:13:37 -05:00
Stephane Nicoll 485bdc9901 Polish "Remove redundant interface modifiers"
Closes gh-15694
2019-01-14 08:13:08 -05:00
igor-suhorukov 2d873c78fe Remove redundant interface modifiers
See gh-15694
2019-01-14 08:12:41 -05:00
Stephane Nicoll 6baa6b291e Polish contribution
Closes gh-15695
2019-01-14 08:11:20 -05:00
Johnny Lim af3ed9ff9f Polish
See gh-15695
2019-01-14 08:09:32 -05:00
Phillip Webb 2f77ef7722 Merge branch '2.1.x' 2019-01-11 16:45:05 -08:00
Phillip Webb 9e58942698 Update copyright year for changed files 2019-01-11 16:42:02 -08:00
Phillip Webb 6a901199f5 Polish 2019-01-11 16:42:02 -08:00
Andy Wilkinson 784f192cf3 Merge branch '2.1.x' 2019-01-11 10:34:48 +00:00
Andy Wilkinson 6307cb5943 Disable Tomcat’s reference clearing
Closes gh-15101
2019-01-11 10:34:14 +00:00
Stephane Nicoll 8d1d3fb087 Polish "Avoid string concatenation inside StringBuilder append()"
Closes gh-15589
2019-01-11 08:30:12 +01:00
igor-suhorukov 59ac85d371 Avoid string concatenation inside StringBuilder append()
See gh-15589
2019-01-11 08:28:19 +01:00
Madhura Bhave 2ab0925222 Merge branch '2.1.x' 2019-01-10 13:04:42 -08:00
Madhura Bhave b345fc8574 Fix validation when key matching the prefix is set
Fixes gh-15597
2019-01-10 13:04:12 -08:00
Brian Clozel ead9b51c9b Merge branch '2.1.x' 2019-01-08 14:26:37 +01:00
Brian Clozel c40e61c117 Merge branch '2.0.x' into 2.1.x 2019-01-08 14:26:03 +01:00
Brian Clozel 0e13fd039d Configure HTTP compression for HTTP/2 with Tomcat
This commit ensures that the compression options are also applied on the
`Http2Protocol` when http/2 is enabled with Tomcat.

Closes gh-15591
2019-01-08 14:14:10 +01:00
Stephane Nicoll 2b304e3d69 Merge branch '2.1.x' 2019-01-08 11:31:17 +01:00
Stephane Nicoll ca7f338a39 Polish "Remove redundant throws Exception"
Closes gh-15647
2019-01-08 11:27:28 +01:00
Stephane Nicoll 5ea9ac0ac6 Merge branch '2.1.x' 2019-01-08 11:14:32 +01:00
Stephane Nicoll 02581c005a Polish "Fix typo"
Closes gh-15642
2019-01-08 11:12:05 +01:00
Michael Simons 7a2313892c Fix typo
See gh-15642
2019-01-08 11:11:34 +01:00
Stephane Nicoll 442225bbf1 Merge branch '2.1.x' 2019-01-03 10:27:13 +01:00
Stephane Nicoll 4729d170a8 Polish "Ensure checking customizer ordering"
Closes gh-15603
2019-01-03 10:26:09 +01:00
Tadaya Tsuyukubo b34e752db6 Ensure checking customizer ordering
See gh-15603
2019-01-03 10:25:49 +01:00
Madhura Bhave aee65441a7 Merge branch '2.1.x' 2019-01-02 10:54:43 -08:00
Madhura Bhave d1e1a82b32 Support binding to collection with EnumSet values
Fixes gh-15539
2019-01-02 10:52:31 -08:00
dreis2211 0f5f6f15dc Use hasFieldOrPropertyWithValue where possible
Closes gh-15582
2018-12-30 09:48:27 +01:00
Stephane Nicoll 8e8910b2ff Merge branch '2.0.x' into 2.1.x 2018-12-28 18:20:43 +01:00
Stephane Nicoll 805ff6000a Polish "Replace indexOf() with a call to the contains()"
Closes gh-15559
2018-12-24 09:52:29 +01:00
igor-suhorukov b370b1f03a Replace indexOf() with a call to the contains()
See gh-15559
2018-12-24 09:52:15 +01:00
igor-suhorukov 7424f48803 Replace redundant call to class isInstance() with instanceof
See gh-15554
2018-12-23 15:50:22 +01:00
Stephane Nicoll 0d67f7ae9a Merge branch '2.1.x' 2018-12-20 18:02:46 +01:00
Stephane Nicoll b039982273 Merge branch '2.0.x' into 2.1.x 2018-12-20 18:02:38 +01:00
dreis2211 9ffb4f69cd Polish javadoc of ConfigurableUndertowWebServerFactory method
Closes gh-15536
2018-12-20 18:01:38 +01:00
Stephane Nicoll 9d67400afa Merge branch '2.1.x' 2018-12-20 17:54:08 +01:00
igor-suhorukov e578d30722 Replace anonymous inner class with lambda
See gh-15438
2018-12-20 17:47:29 +01:00
Andy Wilkinson 3a7406fe3a Merge branch '2.0.x' into 2.1.x 2018-12-20 15:58:03 +00:00
Andy Wilkinson 0741c90489 Avoid blocking on a Mono indefinitely
Closes gh-15535
2018-12-20 15:31:39 +00:00
Andy Wilkinson 9d2d6d5812 Merge branch '2.1.x' 2018-12-20 15:30:51 +00:00
Andy Wilkinson 9a33d1a2f9 Merge branch '2.0.x' into 2.1.x 2018-12-20 15:30:42 +00:00
Andy Wilkinson 8c68da0882 Avoid blocking on a Mono indefinitely
Closes gh-15535
2018-12-20 15:24:53 +00:00
Andy Wilkinson c09a76d4c4 Merge branch '2.1.x' 2018-12-20 10:06:43 +00:00
Andy Wilkinson ad489baaa3 Merge branch '2.0.x' into 2.1.x 2018-12-20 10:06:32 +00:00
Andy Wilkinson d5c8caab59 Merge branch '1.5.x' into 2.0.x 2018-12-20 10:00:35 +00:00
Stephane Nicoll 6207b46bc6 Merge branch '2.1.x' 2018-12-17 17:07:58 +01:00
dreis2211 948902f090 Avoid unnecessary usage of ReflectionTestUtils
Closes gh-15482
2018-12-17 17:07:23 +01:00
Andy Wilkinson ca13385534 Remove remaining assumption about File separator from LogFileTests
See gh-15471
2018-12-17 14:21:28 +00:00
Andy Wilkinson 3d7e4e99c5 Remove assumption about File separator from LogFileTests
See gh-15471
2018-12-17 14:14:57 +00:00
Andy Wilkinson 6adccbfd30 Make LoggingApplicationListener and tests more robust on Windows
Previously, LoggingApplicationListener its tests, and LogFile made some
assumptions that do not hold true on Windows. Specifically,
LoggingApplicationListenerTests used TestPropertySourceUtils to add
properties to the environment. This uses Java's standard Properties
parsing which does a poor job of handling Windows file paths (Strings
with backslashes in them). Secondly, LogFile made assumptions about
the use of forward clashes for the file separator.

This commit replaces the use of TestPropertySourceUtils and removes
the assumption about the OS's file separator.

Closes gh-15471
2018-12-17 14:02:10 +00:00
Andy Wilkinson 61d04db0d7 Minimize and centralize assumptions about build output
Closes gh-15471
2018-12-14 17:50:20 +00:00
igor-suhorukov a2ebba8db1 Replace explicit generic type with diamond operator
See gh-15424
2018-12-09 11:42:27 +01:00
Andy Wilkinson bbf0932f0f Exclude jcl-over-slf4j in favour of spring-jcl
Closes gh-15392
2018-12-07 15:37:24 +00:00
Stephane Nicoll d5f90ffcfb Polish "Replace this lambda with a method reference"
Closes gh-15401
2018-12-07 11:10:10 +01:00
igor-suhorukov 5c1813aef8 Replace this lambda with a method reference
See gh-15401
2018-12-07 11:01:42 +01:00
dreis2211 b528eb8a7e Remove unnecessary cast in LoggingSystemProperties
Closes gh-15297
2018-12-03 11:01:30 +01:00
dreis2211 f57f16c190 Avoid premature declaration of variables
Closes gh-15215
2018-12-03 10:59:20 +01:00
dreis2211 a1a8a8cef0 Avoid instantiation of BeanPropertyBinder in Binder
Closes gh-15181
2018-12-03 10:54:36 +01:00
artsiom e2d5dfad3a Use varargs for DefaultApplicationArguments
Closes gh-15142
2018-12-03 10:48:10 +01:00
Stephane Nicoll 7939b8b4da Polish "Rename logging.file to logging.file.name"
Closes gh-15089
2018-12-03 10:42:30 +01:00
TwinProduction 21da4a5d12 Rename logging.file to logging.file.name
See gh-15089
2018-12-03 10:42:30 +01:00
Phillip Webb 9c426c63bf Polish 2018-11-29 22:57:04 -08:00
Phillip Webb ed9468a31a Update copyright year for changed files 2018-11-29 22:02:45 -08:00
Stephane Nicoll 33000b6e8e Polish contribution
Closes gh-14985
2018-11-28 11:29:37 +01:00
Alon Bar-Lev 108f28417e Allow to disable SSL client authentication on the management port
When server and management are at different ports, and when server
requires TLS client authentication, then there is no simple method to
disable TLS client authentication for management port.

This commit adds an additional "none" option to ssl.client-auth.

Example:

    server.port=8080
    server.ssl.enabled=true
    server.ssl.client-auth=need
    management.server.port=8081
    management.server.ssl.enabled=true
    management.server.ssl.client-auth=none

See gh-14985
2018-11-28 11:29:21 +01:00
dreis2211 17f04b8b75 Replace DirectFieldAccessor usages by hasFieldOrPropertyWithValue
Closes gh-15312
2018-11-28 08:47:41 +01:00
Andy Wilkinson 2dc8f49f8a Polish 2018-11-27 20:54:41 +00:00
Andy Wilkinson dad6d4beca Merge branch '2.0.x' 2018-11-27 20:37:35 +00:00
Andy Wilkinson 2b22b23aad Polish 2018-11-27 20:35:30 +00:00
Andy Wilkinson e1ad5641d5 Polish "Trim whitespace when coercing to a LogLevel"
Closes gh-15143
2018-11-27 15:14:26 +00:00
Dileep Bapat dfe94a0abb Trim whitespace when coercing to a LogLevel
See gh-15143
2018-11-27 15:10:36 +00:00
Stephane Nicoll ae1979f1ff Merge branch '2.0.x' 2018-11-26 10:35:37 +01:00