Commit Graph

1887 Commits

Author SHA1 Message Date
Stephane Nicoll 334f3e08ae Fix formatting 2019-12-30 15:08:50 +01:00
Stephane Nicoll 5f178db49b Polish test setup
This commit polishes a test configuration to avoid registering a mock
for the same bean twice.
2019-12-30 14:52:49 +01:00
Stephane Nicoll cf740add85 Fix component scan test setup
This commit fixes the setup of tests using component scan. Previously,
a configuration used an include filter to only include a particular
configuration class in a given package. Unfortunately, include filters
do not prevent regular filters by default and the definition did not
have the intended behaviour.

This commit disables default filters so that only the specified include
filter is applied.
2019-12-30 14:51:51 +01:00
Stephane Nicoll bb5e09882a Extract RabbitTemplate auto-configuration in a configurer
This commit movers the auto-configuration of RabbitTemplate to a
dedicated class that can be reused to create additional template with
similar settings.

CLoses gh-19440
2019-12-28 10:56:04 +01:00
Stephane Nicoll 015714c1d6 Merge branch '2.2.x'
See gh-19474
2019-12-28 10:52:30 +01:00
Stephane Nicoll 85667ba165 Merge branch '2.1.x' into 2.2.x
See gh-19473
2019-12-28 10:52:01 +01:00
Stephane Nicoll c0f1aaebb6 Fix Tomcat's maxConnections default value
Closes gh-19472
2019-12-28 10:51:42 +01:00
Stephane Nicoll 2c1e81adf0 Polish 2019-12-26 10:42:40 +01:00
Stephane Nicoll 5b1a622195 Harmonize class visibility
Closes gh-19414
2019-12-23 17:07:13 +01:00
Stephane Nicoll 58a28cf54c Merge branch '2.2.x'
Closes gh-19444
2019-12-23 16:54:57 +01:00
Stephane Nicoll c9bb17f444 Merge branch '2.1.x' into 2.2.x
Closes gh-19443
2019-12-23 16:54:29 +01:00
Stephane Nicoll c6dab447cd Fix visibility of inner classes of ServletWebServerFactoryConfiguration
Closes gh-19395
2019-12-23 16:44:52 +01:00
Stephane Nicoll 68dc850a82 Execute batch jobs with ApplicationRunner
This commit migrates JobLauncherCommandLineRunner to an
ApplicationRunner implementation. The latter allows to parse option
arguments (i.e. `--spring.something=value`) and makes it easy to ignore
arguments that are not meant to be passed to batch jobs.

Closes gh-19442
2019-12-23 16:19:28 +01:00
Johnny Lim 6efa98951d Polish LdapAutoConfigurationTests
See gh-19437
2019-12-23 08:53:10 +01:00
Stephane Nicoll 5031e6182b Merge branch '2.2.x'
Closes gh-19435
2019-12-22 08:53:13 +01:00
Filip Hrisafov bb5c151ee0 Disable SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS by default
See gh-19352
2019-12-22 08:52:07 +01:00
Stephane Nicoll fde06f4edd Merge branch '2.2.x'
Closes gh-19434
2019-12-22 08:44:47 +01:00
Stephane Nicoll 2171e7a425 Merge branch '2.1.x' into 2.2.x
Closes gh-19433
2019-12-22 08:44:18 +01:00
Tadaya Tsuyukubo 294267d2e0 Fix typo on ConditionMessage
See gh-19354
2019-12-22 08:40:43 +01:00
dreis2211 4b10462464 Fix compilation error
See gh-19423
2019-12-20 17:10:39 +00:00
Andy Wilkinson 7551a79e80 Merge branch '2.2.x'
Closes gh-19422
2019-12-20 15:55:16 +00:00
Andy Wilkinson ea00ab9919 Protect against NoSuchMethodError when deploying to old Tomcats
Fixes gh-19308
2019-12-20 15:53:08 +00:00
Stephane Nicoll aa821151bb Polish "Detect DirContextAuthenticationStrategy bean"
See gh-19328
2019-12-09 15:58:44 +01:00
Filip Hrisafov c108d2d011 Detect DirContextAuthenticationStrategy bean
This commit improves the LDAP auto-configuration to detect if a
DirContextAuthenticationStrategy bean is defined and, if so, associates
it with the auto-configured `LdapContextSource`.

See gh-19328
2019-12-09 15:58:25 +01:00
Stephane Nicoll 20bebdc07d Merge branch '2.2.x'
Closes gh-19331
2019-12-09 11:58:58 +01:00
dreis2211 b1158bf35d Simplify some Stream API usages
See gh-19291
2019-12-09 11:52:46 +01:00
dreis2211 c6c03e89a4 Remove code that is deprecated since 2.1.x
See gh-19189
2019-11-29 09:58:33 +00:00
Stephane Nicoll 8888f75a41 Polish "Add dedicated namespace for RemoteIpValve properties"
See gh-18489
2019-11-27 14:43:10 +01:00
Victor Mandujano 479cd8856b Add dedicated namespace for RemoteIpValve properties
See gh-18489
2019-11-27 14:07:44 +01:00
Stephane Nicoll cde9c2e853 Merge branch '2.2.x'
Closes gh-19161
2019-11-27 13:50:50 +01:00
Johnny Lim f234d9c0ec Remove ConditionEvaluationReportLoggingListener usage if possible
See gh-19159
2019-11-27 13:49:27 +01:00
Stephane Nicoll d2f256abe8 Polish "Add configuration for RabbitMQ requested channel max property"
See gh-19106
2019-11-27 10:36:56 +01:00
Franjo Zilic c043068578 Add configuration for RabbitMQ requested channel max property
See gh-19106
2019-11-27 10:01:03 +01:00
Stephane Nicoll a4ca1d02b3 Merge branch '2.1.x' into 2.2.x
Closes gh-19112
2019-11-25 13:59:45 +01:00
Stephane Nicoll 5d8fe860d7 Polish "Use ssl.enabled flag when RabbitMQ address has no protocol"
There is a direct link between the sslEnabled flag and the default port
that should be used by an address. The checks are currently set in two
places:

* Determine which port should be used
* Determine if SSL should be enabled

This commit polishes the initial proposal so that secureConnection is
only set if a protocol is available.

See gh-19109
2019-11-25 13:52:27 +01:00
cbono 2210236f82 Use ssl.enabled flag when RabbitMQ address has no protocol
See gh-19109
2019-11-25 11:16:56 +01:00
thelproad 65ab82b3cd Remove redundant code
See gh-19000
2019-11-23 12:01:19 +01:00
Brian Clozel 0c5bb60384 Fix responseCommitted test in webflux error handling
This commit updates the `responseCommitted` after changes were made in
`WebTestClient` with spring-projects/spring-framework#24051.

Fixes gh-19083
2019-11-22 20:58:38 +01:00
Stephane Nicoll 58bfbb92b9 Merge branch '2.1.x' into 2.2.x
Closes gh-19091
2019-11-21 14:38:09 +01:00
Adam Michalik c154a014a1 Remove invalid example of spring.mvc.async.request-timout property
See gh-19057
2019-11-21 14:13:22 +01:00
Brian Clozel 9fe721d75c Temporarily ignore failing error web handler test
See gh-19083
2019-11-21 11:07:23 +01:00
Stephane Nicoll 08067fb816 Polish "Remove reference to ConfigurationPropertiesScan in javadoc"
See gh-18920
2019-11-08 11:10:14 +01:00
wonwoo 92b00255a1 Remove reference to ConfigurationPropertiesScan in javadoc
See gh-18920
2019-11-08 11:09:57 +01:00
Stephane Nicoll d331f28222 Merge branch '2.1.x'
Closes gh-18885
2019-11-05 14:17:35 +01:00
Stephane Nicoll 4d1373c94d Polish "Support amqps:// URIs in spring.rabbitmq.addresses"
See gh-18808
2019-11-05 14:07:24 +01:00
Mark Pollack 0fedb24c6f Support amqps:// URIs in spring.rabbitmq.addresses
See gh-18808

Co-Authored-By: Bryan Kelly <xyloman@gmail.com>
2019-11-05 14:07:24 +01:00
Andy Wilkinson 49566edf6c Reduce visibility of test methods 2019-11-05 12:29:38 +00:00
Andy Wilkinson 63dd159935 Merge branch '2.1.x'
Closes gh-18878
2019-11-05 09:58:04 +00:00
Andy Wilkinson 69a95ce5c1 Allow dependsOn relationships created by post-processor to be overridden
Previously, AbstractDependsOnBeanFactoryPostProcessor was unordered
which meant that it was impossible to guarantee that another bean
factory post-processor would run after it. This prevented overriding
of the dependsOn relationships that is creates.

This commit updates AbstractDependsOnBeanFactoryPostProcessor to give
it a default order of zero. This will allow additional bean factory
post-processors to be configured with a lower precedence order (values
greater than 0) so that they run after any
AbstractDependsOnBeanFactoryPostProcessor and can override the
dependencies that it has configured.

Fixes gh-18362
2019-11-05 09:53:36 +00:00
Andy Wilkinson ae5f2d7725 Do not require aspectjweaver to enable CGLib-based proxies
Previously, AopAutoConfiguration would only enable CGLib-based
proxies if aspectjweaver was on the classpath. The intention was for
CGLib-based proxies to always be used by default so this behaviour
was incorrect.

This commit updates AopAutoConfiguration to force the use of
CGLib-based proxies even in the absence of aspectjweaver.

Closes gh-18523
2019-11-04 15:19:06 +00:00
Andy Wilkinson e26d5d95a8 Do not enable @ConfigurationPropertiesScan be default
In 2.2.0, @ConfigurationPropertiesScan was enabled by default.
Unfortunately, this had the unexpected side-effect of breaking
conditional enablement of a @ConfigurationProperties class via
@EnableConfigurationProperties if the @ConfigurationProperties class
was in a package covered by scanning.

This commit remove @ConfigurationPropertiesScan from
@SpringBootApplication so that it is no longer enabled by default.
2.1.x users who rely upon such conditional enablement of
@ConfigurationProperties classes can now upgrade to 2.2.x without
having to make any changes. Users who do not have such a need and are
in a position to use configuration properties scanning can now opt-in
by adding @ConfigurationPropertiesScan to their main application class
alongside @SpringBootApplication.

Closes gh-18674
2019-11-04 14:09:33 +00:00
Johnny Lim 45d85778b8 Polish
See gh-18838
2019-11-01 09:01:24 +02:00
Brian Clozel b7f59eb7cb Add config property for webflux codec maxInMemorySize
This commit creates a new configuration property
`spring.codec.max-in-memory-size` which configures the maximum
amount of data to be buffered in memory by codecs (both client and
server).

This property has no default value - it will let Spring Framework handle
the default behavior, currently enforcing a 256KB for provided codecs.

Fixes gh-18828
2019-10-31 20:01:43 +01:00
Stephane Nicoll 7f509bf84e Make sure Web infrastructure uses qualified beans
This commit is a follow-up of a change in Spring Framework[1] to make
sure injection points that are expecting a specific bean by name use
a qualifier.

As a result of this change, MVC uses the dedicated MVC validator again
rather than the general one auto-configured by Spring Boot.

[1] https://github.com/spring-projects/spring-framework/issues/23887

Closes gh-18672
2019-10-30 15:47:02 +01:00
Stephane Nicoll 2ceffcee14 Start building against Spring Data Moore-SR1 snapshots
See gh-18744
2019-10-29 10:36:35 +01:00
Stephane Nicoll a315d4229d Start building against Spring Data Lovelace-SR12 snapshots
See gh-18743
2019-10-29 10:31:00 +01:00
dreis2211 9ece2e277f Remove redundant explicit types
See gh-18754
2019-10-27 08:33:01 +01:00
wonwoo 3369d80f3f Polish OnBeanCondition message
See gh-18727
2019-10-26 11:55:34 +02:00
Phillip Webb 597baf9774 Polish "Optimize logger calls"
See gh-18710
2019-10-23 21:00:05 -07:00
wycm 240b1f9e29 Optimize logger calls
Guard logger calls to ensure that they are only made when the
level is set.

See gh-18710
2019-10-23 20:59:11 -07:00
Johnny Lim 8c2d6b28f8 Polish
See gh-18697
2019-10-23 10:09:56 +02:00
dreis2211 8ecdf919f8 Fix Mockito deprecations
See gh-18689
2019-10-23 09:49:33 +02:00
Phillip Webb 511a2a073f Merge branch '2.1.x'
Closes gh-18695
2019-10-22 16:20:05 -07:00
Rafiullah Hamedy 81dc6e02e6 Rename `max-http-post-size` server property
Rename `max-http-post-size` to `max-http-form-post-size` for Jetty and
Tomcat to make it clearer that they only apply to POSTed form content.

See gh-18566
2019-10-22 16:00:43 -07:00
Phillip Webb 714c9b9804 Polish 2019-10-22 13:12:09 -07:00
Stephane Nicoll dccb842286 Polish "Apply dependsOn semantic between Liquibase and JPA"
See gh-18673
2019-10-22 17:44:04 +02:00
Dmytro Nosan bacd36f0cf Apply dependsOn semantic between Liquibase and JPA
This commits restores the dependency between Liquibase and the JPA
EntityManager even if a custom `SpringLiquibase` is configured.

See gh-18673
2019-10-22 17:43:28 +02:00
Stephane Nicoll 4d5d90847e Merge branch '2.1.x'
Closes gh-18682
2019-10-22 09:41:04 +02:00
wycm 681a94b0d5 Optimize debug level logs
See gh-18604
2019-10-22 09:36:48 +02:00
Stephane Nicoll c05f88bf78 Polish "Add missing package-info files"
See gh-18632
2019-10-22 09:35:10 +02:00
Leo Li af114c93ee Add missing package-info files
See gh-18632
2019-10-22 09:30:04 +02:00
Alessandro Falappa f28af3db9f Narrow type for Tomcat 'locale' and 'encoding' properties
See gh-18637
2019-10-22 09:22:48 +02:00
Brian Clozel 1529ba14c8 Rename server.jetty.idle-timeout
This commit renames the `server.jetty.idle-timeout` property to
`server.jetty.thread-idle-timeout`, since there are other timeout
properties that are not tied to the threadpool configuration (e.g. the
connection idle timeout).

We might regroup thread-related properties in a dedicated group in the
future, see gh-18620.

Fixes gh-18615
2019-10-16 14:57:05 +02:00
Andy Wilkinson fd1d653c34 Rename socket factory processor methods on NettyRSocketServerFactory
Previously, the methods were named addServerProcessors and
setServerProcessors which wasn't aligned with them taking
socket factory processors (ServerRSocketFactoryProcessor) as an
argument.

This commit renames the methods to align them more closely with the
type of their arguments.

Closes gh-18617
2019-10-16 13:39:42 +01:00
Brian Clozel 7104b8385f Merge branch '2.1.x' 2019-10-16 14:37:26 +02:00
Brian Clozel 9c5ee1126f Polish
See gh-18473
2019-10-16 14:36:19 +02:00
Brian Clozel 7113d41a80 Merge branch '2.1.x'
Closes gh-18618
2019-10-16 14:09:46 +02:00
Brian Clozel e4fa9ce8c6 Deprecate server.connection-timeout property
Prior to this commit, all supported servers would share the same
configuration property `server.connection-timeout`. Unfortunately, in
many cases the behavior of this timeout changes depending on the server.
From actual connection setup timeout, to detecting and closing idle
connections, this property cannot be properly translated from one server
implementation to another.

This commit deprecates this configuration property and introduces server
specific properties:

* `server.jetty.connection-idle-timeout`
(Time that the connection can be idle before it is closed.)
* `server.netty.connection-timeout`
(Connection timeout of the Netty channel.)
* `server.tomcat.connection-timeout`
(Amount of time the connector will wait, after accepting a connection,
for the request URI line to be presented.)
* `server.undertow.no-request-timeout`
(Amount of time a connection can sit idle without processing a request,
before it is closed by the server.)

`server.connection-timeout` is now deprecated and will be removed in a
future release.

Fixes gh-18473
2019-10-16 13:48:48 +02:00
Andy Wilkinson 4b4b39853b Merge branch '2.1.x'
Closes gh-18608
2019-10-15 19:47:41 +01:00
Andy Wilkinson 00d4b44cbb Remove trailing commas from test SQL scripts
Closes gh-18607
2019-10-15 19:47:27 +01:00
Andy Wilkinson 6e84ae6474 Make SAML 2 login configuration back off with user provider config adapter
Previously, a WebSecurityConfigurerAdapter would be configured
irrespective of whether or not the user had provided their own
WebSecurityConfigurerAdapter. This then required them to use ordering
to diambiguate the configuration and made it harder to take complete
control of security configuration.

This commit updates the configuration of the SAML 2 login configurer
adapter to be conditional on missing bean, aligning it with other
security configuration such as the equivalent OAuth 2 configurer
adapter.

Closes gh-18530
2019-10-15 16:52:18 +01:00
Andy Wilkinson 07d0794827 Consider possibility of missing @ConstructorBinding in failure analysis
Previously, when a NoSuchBeanDefinitionException was being analyzed,
the possibility of a missing @ConstructorBinding annotation on a
@ConfigurationProperties class was not considered.

This commit updates the failure analysis for failed constructor
injection of an instance of a @ConfigurationProperties-annotated
class. When such a failure occurs, adding @ConstructorBinding is
now suggested as an action.

Closes gh-18545
2019-10-15 13:48:20 +01:00
Johnny Lim 701bd0dd46 Polish
See gh-18490
2019-10-02 22:15:05 -07:00
Phillip Webb 795303d667 Replace depends-on post processor configurations
Replace `AbstractDependsOnBeanFactoryPostProcessor` `@Configuration`
classes with simple `@Import` component classes.

Closes gh-18382
2019-10-02 21:41:31 -07:00
Madhura Bhave 40ac5b4ae2 Autoconfigure RSocket Security
Closes gh-18356
2019-10-02 13:54:07 -07:00
Madhura Bhave bc96e09965 Add additional test for reactive security auto-config 2019-10-02 13:46:50 -07:00
Madhura Bhave 22ed56ac52 Add auto-config for Spring Security's SAML support
Closes gh-18260

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
2019-10-02 11:23:21 -07:00
Phillip Webb 71f8347c81 Rename ServerRSocketFactoryCustomizer
Rename `ServerRSocketFactoryCustomizer` to
`ServerRSocketFactoryProcessor` to better reflect that it is not a
traditional customizer.

Closes gh-18390
2019-10-02 10:41:53 -07:00
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
2019-10-02 10:48:57 +01:00
Andy Wilkinson 3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
2019-10-02 10:48:30 +01:00
Vedran Pavic 4808016560 Align with Spring Session MongoDB deprecations
See gh-18470
2019-10-01 21:32:45 +01:00
dreis2211 bafc10f2c4 Fix default values in metadata for HiddenHttpMethodFilter
See gh-18435
2019-09-29 16:18:41 +02:00
Phillip Webb 1f9c9fedb4 Merge branch '2.1.x'
Closes gh-18409
2019-09-28 22:31:17 -07:00
Phillip Webb 615c6d4e86 Restructure RSocket packages and polish
Polish code and relocate `RSocketServerBootstrap` from `server` to
`context` since it's really an `ApplicationContext` concern.

Closes gh-18391
2019-09-28 22:04:30 -07:00
Phillip Webb 4b0fb8ff24 Polish 'Add @LocalRSocketServerPort support'
See gh-18287
2019-09-28 22:03:36 -07:00
Verónica Vásquez 3c8fa3bbd0 Add @LocalRSocketServerPort support
Add an appication context initializer to detect and store the
active RSocket port in the Environment under
`local.rsocket.server.port`.

Additionally add a `@LocalServerPort` that provides a convenient
alternative to `@Value`.

See gh-18287

Co-authored-by: Eddú Meléndez <eddu.melendez@gmail.com>
2019-09-28 22:03:36 -07:00
Tadaya Tsuyukubo bccdf04358 Use ordered TaskExecutorCustomizers
Use an ordered stream in `TaskExecutionAutoConfiguration` when
obtaining the TaskExecutor customizers.

See gh-18333
2019-09-28 18:44:57 -07:00
Madhura Bhave 39ed15728f Configure oauth2client in Reactive OAuth2 client auto-config
Closes gh-18385
2019-09-27 11:42:43 -07:00
Stephane Nicoll f78c9574d8 Start building against Spring Session Corn snapshots
See gh-18257
2019-09-27 16:20:50 +02:00
Phillip Webb d83238aaab Merge branch '2.1.x'
Closes gh-18369
2019-09-26 12:14:35 -07:00