Commit Graph

2189 Commits

Author SHA1 Message Date
Andy Wilkinson b60150b05e Make Tomcat Access Log's buffering configurable via the environment
Closes gh-7456
2016-12-02 13:58:26 +00:00
Stephane Nicoll ee72e788ed Rename `spring-boot-junit-runners` to `spring-boot-test-support`
Closes gh-7421
2016-12-01 16:25:47 +01:00
Andy Wilkinson fdccd8aaa7 Remove use of field injection from ErrorMvcAutoConfiguration 2016-12-01 11:51:29 +00:00
Stephane Nicoll cb9e021fa9 Polish 2016-12-01 12:09:41 +01:00
Stephane Nicoll 2c630b5c61 Validate schema and data resources
Previously, if a user specifies a path to a schema or data DDL that does
not exist, the application will start up fine and the missing DDL would
not be reported.

This commit validates that user-defined resources actually exist and
throw a new `ResourceNotFoundException` if they don't.

Closes gh-7088
2016-12-01 11:52:52 +01:00
Mark Paluch 6698cb71c4 Add User-defined type support for Cassandra
Configure `SimpleUserTypeResolver` if a keyspace is set to resolve
User-defined types.

Closes gh-7523
2016-11-30 15:37:55 +01:00
Stephane Nicoll 2f48c50e84 Merge branch '1.4.x' into 1.5.x 2016-11-30 13:50:09 +01:00
Stephane Nicoll e5ca4990d0 Fix bootstrap-hosts property detection with list
Previously, if `spring.couchbase.bootstrap-hosts` was specified in YAML
or with the `[Idx]` notation, the auto-configuration would not kick in.

This is due to a limitation of `@ConditionalOnProperty` on a property of
type Collection. This commit workarounds this limitation for now with a
dedicated condition.

Closes gh-7508
2016-11-30 13:49:44 +01:00
Johnny Lim c654eff41b Update doc for spring.data.neo4j.open-in-view
See gh-7533
2016-11-30 10:42:18 +01:00
Johnny Lim 423f8037ce Polish
Closes gh-7530
2016-11-30 08:31:13 +01:00
Oscar Utbult fabe35fdc4 Remove redundant toString() invocation
Closes gh-7527
2016-11-30 08:23:03 +01:00
Phillip Webb dada7423b0 Polish 2016-11-28 15:40:08 -08:00
Phillip Webb ec73144240 Fix warnings 2016-11-28 15:31:49 -08:00
Phillip Webb 5ed00b3501 Merge branch '1.4.x' into 1.5.x 2016-11-28 15:27:07 -08:00
Phillip Webb 9fdb563d5a Polish 2016-11-28 15:27:01 -08:00
Phillip Webb 357d072a60 Polish 2016-11-28 15:14:46 -08:00
Andy Wilkinson 2be554456e Introduce SearchStrategy.ANCESTORS as a replacement for .PARENTS
Closes gh-6763
2016-11-28 15:41:53 +00:00
Stephane Nicoll 5d876125de Refine validation auto-configuration
Checking for the presence of a `ValidationProvider` resource is
unfortunately not enough to trigger the validation auto-configuration.

If `hibernate-validator` is added on the classpath without a `javax.el`
implementation, the former will blow up on startup. So far this was a
pilot error so we didn't have to care about it. Now that we have an
auto-configuration that may lead to this error, we need to be extra
careful and check that scenario ourselves.

This commit adds an extra condition that runs as late as possible and
attempt to actually initialize a `Validator`. If that fails for whatever
reason, the auto-configuration will now back off.

Several additional tests have been added to exercise this scenario.

Closes gh-6228
2016-11-28 14:29:05 +01:00
Johnny Lim cabb564804 Add ValidationAutoConfiguration to spring.factories
Closes gh-7494
2016-11-28 09:04:36 +01:00
Stephane Nicoll 0befc310cd Add dedicated settings for maxHttpPostSize
This commit deprecates `server.max-http-post-size` and introduces a
dedicated property for each supported  container. In particular, Undertow
can now define a max size higher than 2GB.

Closes gh-7362
2016-11-25 09:54:10 +01:00
Stephane Nicoll 22208f6a9e Auto-configure validation constraints on bean methods
This commit auto-configures `MethodValidationPostProcessor` if necessary
when a JSR-303 validator implementation is detected on the classpath.

Closes gh-6228
2016-11-24 17:40:33 +01:00
Stephane Nicoll 7e25c0dcdd Fix build 2016-11-24 16:46:34 +01:00
Stephane Nicoll 57605b6749 Merge branch '1.4.x' into 1.5.x 2016-11-24 15:53:38 +01:00
Stephane Nicoll 65b6d8f4f7 Handle `NoClassDefFoundError` in `OnBeanCondition`
If `OnBeanCondition` is used with a `String` literal representing the
fully qualified name of a bean and such type does not exist, it
gracefully manages it as if it was not found. Prior to this commit, an
exception would be thrown if any related class such as the parent
class does not exist.

This commit handles this additional case, catching `NoClassDefFoundError`
the same way it did handle `ClassNotFoundException`. That way, a
missing type will now be considered as absent if it's not on the
classpath.

Closes gh-7459
2016-11-24 15:48:56 +01:00
Stephane Nicoll 64a50b60ab Merge branch '1.4.x' into 1.5.x 2016-11-24 10:01:23 +01:00
Stephane Nicoll 5e8ba5cef6 Fix Couchbase condition on Spring Data class
This commit reverts 7e2d0fd so that the Couchbase auto-configuration can
work without Spring Data again. It also removes the `Class` reference to
a Spring Data class to a `String` reference to make sure the condition
operates properly when said class isn't on the classpath.

Closes gh-7453
2016-11-24 09:41:19 +01:00
Stephane Nicoll 64e0899456 Polish customize Cassandra's Cluster
Closes gh-7320
2016-11-23 15:16:49 +01:00
Eddú Meléndez cb3d14a305 Allow to customize Casssandra's Cluster
This commit allows to configure special customizers to be used by
Cluster.

Closes gh-7312
2016-11-23 15:16:49 +01:00
Stephane Nicoll ea023618a4 Polish upgrade to Spring Session 1.3.0.RC1
Closes gh-7457
2016-11-23 14:39:56 +01:00
Vedran Pavic ffec6fddd2 Upgrade Spring Session to 1.3.0.RC1
See gh-7457
2016-11-23 14:39:56 +01:00
Phillip Webb 88c84ce234 Merge branch '1.4.x' into 1.5.x 2016-11-22 14:53:30 -08:00
Phillip Webb b6b8bef009 Polish 2016-11-22 14:51:56 -08:00
Phillip Webb 7e2d0fd1c0 Check for Spring Data before configuring Couchbase
Add guard to `CouchbaseAutoConfiguration` so ensure that Spring Data
Couchbase is on the classpath.

Fixes gh-7453
2016-11-22 14:32:38 -08:00
Grigory Fadeev 1ea829e003 Fix connector used to configure connection timeout
Fix Tomcat customization so that the main connection is configured with
any timeout.

Closes gh-7425
2016-11-22 14:28:57 -08:00
Andy Wilkinson 65d0c07fd6 Polish "Validate excluded autoconfiguration classes"
- Apply code formatting
- Move configuration of excepted exception to immediately before line
  that will throw the exception
- Use String.format with %n to produce platform-specific new lines

See gh-7407
2016-11-22 14:10:37 +00:00
Madhura Bhave a9ffdca6f2 Validate excluded autoconfiguration classes
Closes gh-7407
See gh-6865
2016-11-22 14:02:51 +00:00
Andy Wilkinson ff4bbd9291 Fix javadoc and apply code formatting to Kafka contribution
See gh-6961
2016-11-22 11:34:29 +00:00
Andy Wilkinson 29f0ae3fa8 Use a random port in new tests in SpringBootWebSecurityConfigurationTests
See gh-7373
2016-11-22 11:03:05 +00:00
Stephane Nicoll cc07f56c87 Merge pull request #6961 from garyrussell:kafkaAutoConfig
* pr/6961:
  Polish "Apache Kafka support" contribution
  Add Apache Kafka support
2016-11-22 10:29:01 +01:00
Stephane Nicoll 642af52d01 Polish "Apache Kafka support" contribution
Closes gh-6961
2016-11-22 10:22:00 +01:00
Gary Russell c4188c8e4a Add Apache Kafka support
See gh-6961
2016-11-22 09:34:01 +01:00
Andy Wilkinson 5a9fc9aa49 Merge branch '1.4.x' into 1.5.x 2016-11-21 13:35:22 +00:00
Andy Wilkinson 3464c0b16e Ensure that Hypermedia-related auto-config works without Jackson
Previously, both HypermediaAutoConfiguration and HttpMessageConverters
assumed that if Spring HATEOAS was on the class path, then Jackson
would be too. When this was not the case, an application would fail
to start.

This commit updates both classes to back off appropriately when
Spring HATEOAS is on the classpath but Jackson is not.

Closes gh-7434
2016-11-21 13:25:25 +00:00
Stephane Nicoll 9423b9831c Merge branch '1.4.x' into 1.5.x 2016-11-20 15:52:49 +09:00
Stephane Nicoll 249ed899a6 Fix use of KB and MB in Multipart documentation
Closes gh-7364
2016-11-20 15:51:47 +09:00
Phillip Webb 1657120286 Move ModifiedClassPathRunner to its own module
Migrate `ModifiedClassPathRunner` from `spring-boot` test source to
its own module.

Fixes gh-7420
2016-11-18 17:27:54 -08:00
Phillip Webb 9e18021e8c Merge branch '1.4.x' into 1.5.x 2016-11-18 15:59:05 -08:00
Phillip Webb fce17ca6d9 Polish 2016-11-18 15:50:19 -08:00
Andy Wilkinson 1cd781b242 Make spring-boot-test compatible with Mockito 2.1 and 2.2
We use some internal Mockito classes and some  breaking API changes
have been made to them in Mockito 2. This commit introduces a utility
class, SpringBootMockUtil, to shield our code from these differences.
Mockito 1 is called directly and Mockito 2 is called via reflection.

To allow these changes to be tested, FilteredClassPathRunner has been
enhanced to also support overriding a dependency on the class path.
As a result it has been renamed to ModifiedClassPathRunner. The new
ClassPathOverrides annotation can be used to provide the Maven
coordinates of one or more dependencies that should be resolved and
added to the class path. Such additions are added to the start of
the class path so that they override any existing dependency that
contains the same classes.

Closes gh-6520
2016-11-18 16:39:44 +00:00
Andy Wilkinson af4ca7cf6e Align Spring Data Neo4j auto-configuration with latest Ingalls snapshots
Closes gh-7391
2016-11-18 11:22:39 +00:00
Stephane Nicoll 2ba3b27954 Merge branch '1.4.x' into 1.5.x
# Conflicts:
#	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
#	spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
2016-11-18 11:56:22 +09:00
Stephane Nicoll 0072a93915 Expose Tomcat's accesslog requestAttributesEnabled
This commit adds an extra property to the `server.tomcat.accesslog` to
control the `reqestAttributesEnabled` flag. This flag sets request
attributes for IP address, Hostname, protocol and port used for the
request.

Closes gh-7367
2016-11-18 11:48:09 +09:00
Phillip Webb 238c22cd73 Polish content security policy contribution
See gh-7373
See gh-7373
2016-11-16 15:30:36 -08:00
Christoffer Sawicki d7bbea63b7 Add properties for content security policy
Add `content-security-policy` and `content-security-policy-mode`
`security.header` properties and update auto-configuration to apply
them when specified.

Fixes gh-7373
Closes gh-7357
2016-11-16 15:30:36 -08:00
Johnny Lim 8038882d46 Polish
Closes gh-7403
2016-11-16 13:36:51 -08:00
Andy Wilkinson 387a406aad Merge branch '1.4.x' into 1.5.x 2016-11-16 09:13:17 +00:00
Andy Wilkinson b3e0a37197 Remove unwanted System.out calls in test code 2016-11-16 09:12:13 +00:00
Spring Buildmaster e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Stephane Nicoll b51f92d9a4 Merge branch '1.4.x' into 1.5.x 2016-11-06 11:25:44 +01:00
Vedran Pavic 5783cd5593 Fix JWT token URI derivation
Closes gh-7299
2016-11-06 11:24:50 +01:00
Phillip Webb 81c5753f4d Merge branch '1.4.x' into 1.5.x 2016-11-03 14:49:38 -07:00
Phillip Webb 90afc8ebbe Formatting 2016-11-03 14:48:10 -07:00
Madhura Bhave 73308ba24b Merge remote-tracking branch 'springsource/1.4.x' into 1.5.x 2016-11-03 10:15:49 -07:00
Madhura Bhave b04a74f01d Fix failure analysis for Collections and Maps
Closes gh-6996
2016-11-03 10:14:01 -07:00
Phillip Webb 5b66ffbb4b Merge branch '1.4.x' into 1.5.x 2016-10-31 23:09:36 -07:00
Phillip Webb f4328b41af Polish 2016-10-31 23:09:25 -07:00
Phillip Webb 1b17677e0b Polish TLD skip pattern support
See gh-5010
2016-10-31 23:09:24 -07:00
Phillip Webb dbf6d3d418 Don't detect persistenceUnitRootLocation
Update JpaBaseConfiguration so that the persistenceUnitRootLocation is
no longer detected. The update to gh-7003 means that we can now rely on
the standard detection mechanism.

Fixes gh-6983
See gh-6635
2016-10-31 15:57:18 -07:00
Stephane Nicoll 9100897dcb Automatically exclude auto-configurations from component scan
Previously, if an auto-configuration class was (wrongly) located in a
candidate package for component scanning, the class was silently loaded
as an app configuration (i.e. with the wrong lifecycle).

This commit adds an `AutoConfigurationExcludeFilter` to
`@SpringBootApplication` so that such classes are automatically
filtered. Since they are registered in `spring.factories`, we can
silently ignore them since we know they'll be loaded later on.

Closes gh-7168
2016-10-31 15:13:58 +01:00
Stephane Nicoll 4f06e52d7e Allow adding additional tld skip patterns
This commit improves `TomcatEmbeddedServletContainerFactory` so that tld
skip patterns can be set or added to an existing set. An additional
`server.tomcat.additional-tld-skip-patterns` is now being exposed to
easily add patterns via configuration.

Closes gh-5010
2016-10-31 10:15:16 +01:00
Stephane Nicoll 94da9ad6e6 Merge branch '1.4.x' into 1.5.x 2016-10-30 11:24:46 +01:00
Stephane Nicoll 1a6ab90255 Polish test 2016-10-30 11:24:33 +01:00
Stephane Nicoll ed7de8eb60 Polish contribution
Also add rotate attribute to Undertow

Closes gh-7225
2016-10-26 11:31:17 +02:00
Matthieu Mouminoux 1d95219c4b Allow to configure Tomcat's rotatable property
See gh-7225
2016-10-26 10:28:06 +02:00
Stephane Nicoll ae4dd0d17e Merge branch '1.4.x' into 1.5.x 2016-10-24 18:08:23 +02:00
Stephane Nicoll a638dcd51b Remove unnecessary use of System.out.println 2016-10-24 18:07:40 +02:00
Andy Wilkinson a416f496c0 Clean up deprecation and unused code warnings 2016-10-18 20:43:05 +01:00
Andy Wilkinson 29d4a01b30 Merge branch '1.4.x' into 1.5.x 2016-10-13 12:30:05 +01:00
Andy Wilkinson 7968c6b548 Assign on order to OnPropertyCondition
Closes gh-7144
2016-10-13 12:29:35 +01:00
Andy Wilkinson cc04621dc2 Assign an order to OnResourceCondition
Closes gh-7145
2016-10-13 12:27:47 +01:00
Madhura Bhave 90722a9bca Add @ConditionalOnCloudPlatform
Add a @ConditionalOnCloudPlatform annotation that matches based on the
active ClouldPlatform.

Fixes gh-7155
2016-10-12 13:32:37 -07:00
Phillip Webb d818a09ed8 Polish 2016-10-11 23:38:14 -07:00
Phillip Webb d3e06c4627 Merge branch '1.4.x' into 1.5.x 2016-10-11 21:46:06 -07:00
Phillip Webb db3f488d5a Polish 2016-10-11 17:54:00 -07:00
Stephane Nicoll 6fb53f90e5 Polish contribution
Closes gh-6666
2016-10-11 17:03:10 +02:00
Maciej Walkowiak 47ec8630c8 Add Rabbit idleEventInterval property
This commit adds a property to configure how often idle container events
should be published.

See gh-6666
2016-10-11 15:49:10 +02:00
Andy Wilkinson f0b235cbc5 Merge branch '1.4.x' into 1.5.x 2016-10-11 13:04:59 +01:00
Andy Wilkinson 0333416952 Update WelcomePageHandlerMapping to handle reqs with no Accept header
Closes gh-7138
2016-10-11 13:02:36 +01:00
Stephane Nicoll ab2a2579c8 Polish contribution
Closes gh-6571
2016-10-10 11:37:21 +02:00
Aurélien Leboulanger 7efdb91641 Manage Tomcat queued connections
Adding two tomcat server properties:
- server.tomcat.accept-count
- server.tomcat.max-connections

Closes gh-6433
2016-10-10 11:37:12 +02:00
Stephane Nicoll 3e1425ebed Polish contribution
Closes gh-6543
2016-10-10 10:43:12 +02:00
Vedran Pavic 286a928347 Improve database initializers
This commit improves database initializers for Spring Batch and Spring
Session by introducing `AbstractDatabaseInitializer` which eliminates
duplicated logic in existing initializers. Additionally, database
platform resolution now relies on `DatabaseDriver`.

See gh-6543
2016-10-10 09:53:40 +02:00
Stephane Nicoll ed333a67b4 Expose Spring Data Rest RepositoryDetectionStrategy
Closes gh-7113
2016-10-07 10:35:48 +02:00
Stephane Nicoll 02b0e3955c Merge branch '1.4.x' into 1.5.x 2016-10-07 09:46:21 +02:00
Johnny Lim 1c4c0c6119 Fix String.format() usages
Closes gh-7120
2016-10-07 09:45:43 +02:00
Andy Wilkinson 9b8f33df6d Merge branch '1.4.x' into 1.5.x 2016-10-06 15:53:07 +01:00
Andy Wilkinson 20a2db79bd Separate conditions that did and did not match in auto-config report
Closes gh-7098
2016-10-06 15:52:45 +01:00
Stephane Nicoll f82e91df39 Merge branch '1.4.x' into 1.5.x 2016-10-06 13:29:53 +02:00
Stephane Nicoll 03961e6692 Polish contribution
Closes gh-7004
2016-10-06 13:28:23 +02:00
Rob Fletcher 7fcb197092 Allow configuration to specify randomly generated database name
See gh-7004
2016-10-06 11:40:19 +02:00