Commit Graph

2861 Commits

Author SHA1 Message Date
Phillip Webb 9ccf47398e Formatting 2016-12-30 10:56:44 -08:00
Stephane Nicoll 22a384ac28 Merge branch '1.5.x' 2016-12-30 16:11:13 +01:00
Kazuki Shimizu 85503fcbca Polishing log message and comment
Closes gh-7793
2016-12-30 16:04:38 +01:00
Stephane Nicoll a90a73d1ac Merge branch '1.4.x' into 1.5.x 2016-12-30 16:04:00 +01:00
Stephane Nicoll 7b494cf319 Polish
See gh-7793
2016-12-30 15:59:17 +01:00
Stephane Nicoll 0b67a89bc6 Merge branch '1.5.x' 2016-12-30 15:16:31 +01:00
Stephane Nicoll c230a21a8c Polish CacheManagerCustomizers
Closes gh-7792
2016-12-30 15:16:13 +01:00
Stephane Nicoll 2f3571f173 Defend against lambda transaction customizers
Update `CacheManagerCustomizers` to deal directly with
`ClassCastException` assuming that they are because a customizer is
implemented using a lambda.

Closes gh-7788
2016-12-30 15:16:13 +01:00
Stephane Nicoll 1fa8b1ac91 Defend against lambda transaction customizers
Update `CacheManagerCustomizers` to deal directly with
`ClassCastException` assuming that they are because a customizer is
implemented using a lambda.

Closes gh-7788
2016-12-30 14:19:03 +01:00
Phillip Webb 86a42e4e44 Merge branch '1.5.x' 2016-12-30 00:32:00 -08:00
Phillip Webb 54aeff47a2 Add exclude support to @ImportAutoConfiguration
Update `@ImportAutoConfiguration` with support for an exclude attribute
that works in a similar way to `@EnableAutoConfiguration`.

Also update existing `@Test...` annotation with exclude attribute
aliases.

Fixes gh-6809
2016-12-30 00:31:30 -08:00
Phillip Webb 4d73f3d2e9 Merge branch '1.5.x' 2016-12-29 22:22:04 -08:00
Phillip Webb 3c930347c5 Defend against lambda transaction customizers
Update `TransactionManagerCustomizers` to deal directly with
`ClassCastExceptions` assuming that they are because a customizer is
implemented using a lambda.

See gh-7561
2016-12-29 16:37:13 -08:00
Kazuki Shimizu a7b77e6f9a Remove a nested TransactionProperties
Remove a few nested `TransactionProperties` that should have been
deleted in commit f22744c748.

See gh-7561
Closes gh-7786
2016-12-29 16:19:03 -08:00
Stephane Nicoll 68d95f953a Merge branch '1.5.x' 2016-12-29 10:51:56 +01:00
Stephane Nicoll 7c25ccb0f3 Merge branch '1.4.x' into 1.5.x 2016-12-29 10:51:41 +01:00
Stephane Nicoll 1f5970c537 Fix auto-configuration class reference
Closes gh-7781
2016-12-29 10:49:19 +01:00
Stephane Nicoll 301b8bc611 Make the dependency to TransactionAutoConfiguration explicit
Closes gh-7773
2016-12-29 10:38:11 +01:00
Stephane Nicoll 6ba4b3cf86 Merge branch '1.5.x' 2016-12-29 10:07:36 +01:00
Stephane Nicoll 4b641ca211 Polish
Closes gh-7561
2016-12-29 10:07:23 +01:00
Phillip Webb f9bbe43791 Merge branch '1.5.x' 2016-12-28 21:00:37 -08:00
Phillip Webb f22744c748 Add support for TransactionManagerCustomizers
Add a `TransactionManagerCustomizer` callback interface that can be
used to customize auto-configured `PlatformTransactionManagers`.

Also update `...transaction.*` properties under a single unified
`spring.transaction...` key since the existing auto-configurations
would often share a transaction manager (the technology specific
transaction managers are `@ConditionalOnMissingBean` and may use
a manager created by a previous auto-configuration).

See gh-7561
2016-12-28 20:53:20 -08:00
Phillip Webb 601f7c0a69 Polish 2016-12-28 19:29:05 -08:00
Phillip Webb 519f9c6c54 Merge branch '1.5.x' 2016-12-28 15:35:32 -08:00
Phillip Webb 8b69856fc9 Polish 2016-12-28 15:23:26 -08:00
Phillip Webb 49fa702708 Merge branch '1.5.x' 2016-12-27 15:06:22 -08:00
Phillip Webb 3af5ae2a26 Polish `ObjectProvider` names
Consistently use the simple name for ObjectProvider parameter and
field names. For example:

  `ObjectProvider<Something> something`

rather than

  `ObjectProvider<Something> somethingProvider`
2016-12-27 15:04:06 -08:00
Phillip Webb e0541d0f74 Polish 2016-12-27 14:48:44 -08:00
Stephane Nicoll 3fdfc3f052 Merge branch '1.5.x' 2016-12-27 11:12:38 +01:00
Stephane Nicoll b24c8d04ba Allow to customize the auto-configured JestClient
This commit adds a `HttpClientConfigBuilderCustomizer` to further tune
the auto-configured `JestClient`.

Closes gh-7762
2016-12-27 11:12:23 +01:00
Stephane Nicoll a60e356136 Enable Jest's multi-threaded support by default
Since the `JestClient` is auto-configured as a bean, it must have its
multi-threaded support enabled by default. This commit exposes a new
`spring.elasticsearch.jest.multi-threaded` property that is `true` by
default.

Closes gh-6806
2016-12-27 10:46:26 +01:00
Phillip Webb 291752a317 Merge branch '1.5.x' 2016-12-24 11:26:50 -08:00
Phillip Webb d05357e036 Migrate to Tomcat WebSocket client
Move samples and tests from Jetty websocket client to Tomcat since the
upcoming Jetty release contains a bug in `JsrSession`
(https://github.com/eclipse/jetty.project/issues/1202).

See gh-7599
2016-12-24 11:24:30 -08:00
Spring Buildmaster 9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Stephane Nicoll 219e0baa58 Merge branch '1.5.x' 2016-12-22 15:40:02 +01:00
Stephane Nicoll 449043bf21 Polish contribution
Closes gh-6900
2016-12-22 15:39:31 +01:00
Vedran Pavic 65c2d1f5e7 Add support for vendor specific Flyway migration locations
This commit adds support for using `{vendor}` placeholder in
`flyway.locations` configuration property value.

See gh-6900
2016-12-22 14:56:28 +01:00
Stephane Nicoll 234c170bbb Merge branch '1.5.x' 2016-12-22 14:49:14 +01:00
Stephane Nicoll 62bff1017e Validate that AopAutoConfiguration back off properly
Closes gh-7694
2016-12-22 14:48:54 +01:00
Stephane Nicoll 6d0888ecf4 Merge branch '1.5.x' 2016-12-22 10:33:39 +01:00
Stephane Nicoll eb294956d8 Allow to customize Cluster.Builder rather than Cluster
Rework cb3d14a so that the customizer operates on the Builder rather than
the Cluster. The former exposes many more options.

See gh-7320
Closes gh-7669
2016-12-22 10:32:54 +01:00
Phillip Webb 6e02fe59f7 Merge branch '1.5.x' 2016-12-21 22:32:43 -08:00
Phillip Webb 982f41b70c Polish @IntegrationComponentScan auto-configuration
See gh-2037
See gh-7718
2016-12-21 22:22:50 -08:00
Artem Bilan a79f71cbe8 Add @IntegrationComponentScan auto-configuration
Update Spring Integration auto-configuration so that
`@IntegrationComponentScan` from `AutoConfigurationPackages` is
implicitly applied. Prior to this commit `@MessagingGateway` interfaces
would only get picked up if `@IntegrationComponentScan` was added
alongside with the `@SpringBootApplication`.

Fixes gh-2037
Closes gh-7718
2016-12-21 20:18:07 -08:00
Phillip Webb b87e02dde0 Polish Spring Integration metrics support
See gh-7722
2016-12-21 20:18:06 -08:00
Artem Bilan d69e43b433 Refactor Spring Integration metrics support
Update Spring Integration metrics support since Spring Integration
`4.3.6`+ no longer needs `spring-integration-jmx` enable
`MessageChannel`, `MessageHandler` and `MessageSource` metrics.

- Add `IntegrationManagementConfiguration` conditional auto-configuration
  to provide `@EnableIntegrationManagement` when JMX is `enabled` or there
  is no `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean.
  By default this bean doesn't exist and you explicitly should declare it
  (e.g. via `@EnableIntegrationManagement`) if you would like to collect
  metrics. At the same time Spring Integration enables it when JMX
  management is present (that is a purpose of that new
  `IntegrationManagementConfiguration`)

- Change `SpringIntegrationMetricReader` to read metrics from the
  `IntegrationManagementConfigurer`, not `IntegrationMBeanExporter`

- Change `PublicMetricsAutoConfiguration` to register
  `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean if
  not present. Since we are here in `actuator`, therefore we are
  interested in the metrics for SI as well.

- Since we don't need JMX for the metrics any more, remove SI-JMX
  dependency from the `spring-boot-starter-integration`.

- Remove `IntegrationManagementConfiguration` modification from the
  `integrationMbeanExporter()`, since that looks like mutation of an
  external object, when end-user would prefer their own options.
  Therefore we don't need `ObjectProvider<IntegrationManagementConfigurer>`, too

- Add missed `MessageSourceMetrics` gathering for the
  `SpringIntegrationMetricReader`

Closes gh-7722
2016-12-21 20:18:06 -08:00
Artem Bilan 28474aa30a Fix compatibility with Apache Kafka 0.10.1
Update KafkaProperties since  Apache Kafka `0.10.1` changed the type
for the `ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG` from the
`Long` to `Integer`.

Kafka includes the following conversion logic:

    case LONG:
        if (value instanceof Integer)
            return ((Integer) value).longValue();
        if (value instanceof Long)
            return (Long) value;
        else if (value instanceof String)
            return Long.parseLong(trimmed);

So we remain compatible with both `0.10.0` and `0.10.1`

Closes gh-7723
2016-12-21 20:18:04 -08:00
Johnny Lim e12b4a944f Polish 2016-12-21 20:18:04 -08:00
Phillip Webb ae389d27a6 Polish 2016-12-21 14:51:37 -08:00
Phillip Webb 8b47561f7e Merge branch '1.5.x' 2016-12-20 21:56:04 -08:00
Phillip Webb 8f7efbe12a Polish `spring.redis.url` support
See gh-7395
2016-12-20 21:16:42 -08:00
Marco Aust 90eb58252e Add support for `spring.redis.url` property
Update `RedisAutoConfiguration` to optionally configure Redis using a
`spring.redis.url` property`.

Closes gh-7395
2016-12-20 21:16:42 -08:00
Phillip Webb 38f7389eab Polish loggers 2016-12-20 21:16:40 -08:00
Phillip Webb 1f7b3cad45 Polish Kafka properties
Closes gh-7672
2016-12-20 18:15:11 -08:00
Gary Russell bdda470305 Support arbitrary Kafka properties
Add support for arbitrary Kafka properties via
`spring.kafka.properties.*` and also a `spring.kafka.max.poll.records`
property.

See gh-7672
2016-12-20 18:14:55 -08:00
Phillip Webb 99e72664d9 Polish spring transaction manager properties
Polish and update contribution so that TransactionManager properties can
be defined per technology, rather than globally.

Closes gh-7561
2016-12-20 17:59:19 -08:00
Kazuki Shimizu 80eee6b30f Support spring transaction manager properties
Add Spring TransactionManager properties to allow timeout and rollback
settings to be configured.

See gh-7561
2016-12-20 17:57:17 -08:00
Phillip Webb 3f4c32fcdd Polish 2016-12-20 14:54:04 -08:00
Dave Syer 5fa507a477 Merge remote-tracking branch 'origin/1.5.x' 2016-12-20 13:00:03 +00:00
Dave Syer 6ccd858fc0 Fix checkstyle violations 2016-12-20 12:59:51 +00:00
Dave Syer 0b6778754c Merge remote-tracking branch 'origin/1.5.x' 2016-12-20 12:56:40 +00:00
Dave Syer 77a1a3b3c0 Allow user to signal that OAuth2 client is using client_credentials
By configuring security.oauth2.client.grantType=client_credentials the
user signals that (even in a web application) he doesn't want to use
the auth code grant (and hence session and request scoped beans for
client context).
2016-12-20 12:55:45 +00:00
Stephane Nicoll 998ff2feee Merge branch '1.5.x' 2016-12-20 11:59:32 +01:00
Stephane Nicoll 851ce2286f Allow to override Couchbase's CustomConversions
Closes gh-7700
2016-12-20 11:59:16 +01:00
Phillip Webb e248b67751 Polish formatting 2016-12-19 13:40:47 -08:00
Phillip Webb 1f417997f3 Merge branch '1.5.x' 2016-12-19 13:21:18 -08:00
Phillip Webb 6121208cbb Polish formatting 2016-12-19 12:47:03 -08:00
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 2016-12-19 12:36:57 -08:00
Phillip Webb bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Stephane Nicoll 0e8ccbc1d9 Merge branch '1.5.x' 2016-12-19 14:06:30 +01:00
Stephane Nicoll 9104ea81e8 Expose Validator bean
This commit improves ValidationAutoConfiguration so that a `Validator`
bean is exposed if JSR 303 is available. This has the side effect of
automatically enable Spring Data Couchbase's entity validation rather
than requiring to expose a `Validator` bean.

Closes gh-5178
2016-12-19 14:06:17 +01:00
Andy Wilkinson a349e2f5ae Merge branch '1.5.x' 2016-12-16 12:17:44 +00:00
Andy Wilkinson cedac27c80 Require Bean Validation 1.1 to enable validation auto-configuration
Previously, ValidationAutoConfiguration would configure a
MethodValidationPostProcessor if any Bean Validation 1.0 or later
implementation was available, however the underlying infrastructure
requires Bean Validation 1.1 with any implementation or
Bean Validation 1.0 with Hibernate Validator 4.3.

This caused a problem on TomEE which uses Apache BVal, and Bean
Validation 1.0 implementation. Spring Framework would identify that
Bean Validaton 1.0 was being used and then try to load Hibernate
Validator classes that are not present.

This commit fixes the problem by requiring Bean Validation 1.1 before
auto-configuring a MethodValidationPostProcessor.

Closes gh-7665
2016-12-16 12:17:34 +00:00
Andy Wilkinson 943262bb97 Raise the minimum supported version of Hibernate to 5.2.x
Closes gh-7586
2016-12-15 21:31:53 +00:00
Stephane Nicoll 9056e9bd7e Merge branch '1.5.x' 2016-12-15 16:55:49 +01:00
Stephane Nicoll d8d5950e99 Enable validation in `AutoConfigureWebMvc`
Closes gh-7582
2016-12-15 16:55:34 +01:00
Andy Wilkinson cea00f22b1 Merge branch '1.5.x' 2016-12-13 12:41:48 +00:00
Andy Wilkinson 149f19cd58 Register any EventListener beans with auto-configured SessionFactory
Closes gh-7531
2016-12-13 12:41:29 +00:00
Stephane Nicoll b80ad2a212 Harmonize Caffeine CacheManager bean name
Closes gh-6980
2016-12-12 11:40:39 +01:00
Madhura Bhave 1cd1054514 Merge branch '1.5.x' 2016-12-06 11:08:24 -08:00
Madhura Bhave 95be208f0f Use IgnoredRequestCustomizer to ignore paths
Update `SpringBootWebSecurityConfiguration` to ignore requests by
delegating to `IgnoredRequestCustomizer` beans. This allows a single
Spring Boot `WebSecurityConfigurer<WebSecurity>` bean to be used which
prevents potential exceptions caused by duplicate `@Order` values.

Fixes gh-7106
2016-12-05 17:57:18 -08:00
Phillip Webb 263d444d4e Merge branch '1.5.x' 2016-12-05 11:20:24 -08:00
Phillip Webb f6b0652369 Merge branch '1.4.x' into 1.5.x 2016-12-05 11:17:13 -08:00
Madhura Bhave 64da63aa96 Use empty message for Non-Spring Boot Condition
Update `AbstractNestedCondition` to use an empty message for non
Spring Boot nested conditions.

Fixes gh-7519
Closes gh-7529
2016-12-05 11:16:25 -08:00
Phillip Webb e430583eaf Polish 2016-12-05 11:08:38 -08:00
Andy Wilkinson d0b1cad00f Merge branch '1.5.x' 2016-12-05 10:48:49 +00:00
Andy Wilkinson 967625db1e Replace field injection with constructor injection in config classes
Closes gh-7563
2016-12-05 10:48:01 +00:00
Andy Wilkinson 73ba04f878 Merge branch '1.5.x' 2016-12-05 09:21:04 +00:00
Andy Wilkinson 5ac75c949c Increate timeout in Kafka tests as Windows CI agents are very slow 2016-12-05 09:20:43 +00:00
Andy Wilkinson 598eca7e0f Merge branch '1.5.x' 2016-12-02 17:58:36 +00:00
Andy Wilkinson 1464425d64 Remove use of @Component from classes that are not scanned
Closes gh-7549
2016-12-02 17:57:21 +00:00
Andy Wilkinson 665d82ab9b Merge branch '1.5.x' 2016-12-02 14:06:33 +00:00
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 816c236e5b Merge branch '1.5.x' 2016-12-01 16:28:29 +01: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 b4695a2e80 Merge branch '1.5.x' 2016-12-01 11:52:02 +00:00
Andy Wilkinson fdccd8aaa7 Remove use of field injection from ErrorMvcAutoConfiguration 2016-12-01 11:51:29 +00:00
Stephane Nicoll bd2415463c Merge branch '1.5.x' 2016-12-01 12:13:02 +01:00
Stephane Nicoll cb9e021fa9 Polish 2016-12-01 12:09:41 +01:00
Stephane Nicoll a4770f90dc Merge branch '1.5.x' 2016-12-01 11:53:52 +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
Stephane Nicoll 056819b2aa Merge branch '1.5.x' 2016-11-30 15:41:09 +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 0e7f9dae45 Merge branch '1.5.x' 2016-11-30 13:50:26 +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
Stephane Nicoll 2dbebf67e8 Merge branch '1.5.x' 2016-11-30 10:56:14 +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
Stephane Nicoll 0568afc6cb Merge branch '1.5.x' 2016-11-30 08:31:41 +01:00
Johnny Lim 423f8037ce Polish
Closes gh-7530
2016-11-30 08:31:13 +01:00
Stephane Nicoll e7275b62dc Merge branch '1.5.x' 2016-11-30 08:27:30 +01:00
Oscar Utbult fabe35fdc4 Remove redundant toString() invocation
Closes gh-7527
2016-11-30 08:23:03 +01:00
Phillip Webb fe63c981f8 Merge branch '1.5.x' 2016-11-28 15:40:20 -08:00
Phillip Webb dada7423b0 Polish 2016-11-28 15:40:08 -08:00
Phillip Webb b4c3f4f504 Merge branch '1.5.x' 2016-11-28 15:37:43 -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 4870349438 Merge branch '1.5.x' 2016-11-28 16:01:39 +00: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 a2803f4139 Merge branch '1.5.x' 2016-11-28 14:29:56 +01: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
Stephane Nicoll e354576c09 Merge branch '1.5.x' 2016-11-28 09:05:41 +01:00
Johnny Lim cabb564804 Add ValidationAutoConfiguration to spring.factories
Closes gh-7494
2016-11-28 09:04:36 +01:00
Stephane Nicoll e81f7d5811 Remove deprecated code
See gh-7362
2016-11-25 10:10:55 +01:00
Stephane Nicoll f260cd9a07 Merge branch '1.5.x' 2016-11-25 10:10:17 +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 3bfbbeb9f4 Merge branch '1.5.x' 2016-11-24 17:44:17 +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 fd62707cbb Merge branch '1.5.x' 2016-11-24 16:46:52 +01:00
Stephane Nicoll 7e25c0dcdd Fix build 2016-11-24 16:46:34 +01:00
Stephane Nicoll c62f340c34 Merge branch '1.5.x' 2016-11-24 15:53:51 +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 662b05b90c Merge branch '1.5.x' 2016-11-24 10:01:53 +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 94542cee1f Merge branch '1.5.x' 2016-11-23 15:17:12 +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 2f57e1885a Merge branch '1.5.x' 2016-11-23 14:40:29 +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 e0dfff2b23 Merge branch '1.5.x' 2016-11-22 14:54:17 -08: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 8d589b9a05 Merge branch '1.5.x' 2016-11-22 14:38:07 +00: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 0b94d71671 Merge branch '1.5.x' 2016-11-22 11:35:20 +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 9e4fea5f54 Merge branch '1.5.x' 2016-11-22 11:03:11 +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 e3688455fa Merge branch '1.5.x' 2016-11-22 10:30:31 +01: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 bbf6fee446 Merge branch '1.5.x' 2016-11-21 13:35:35 +00: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 77bef0536f Merge branch '1.5.x' 2016-11-20 15:53:04 +09: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 20d7dd5747 Merge branch '1.5.x' 2016-11-18 17:30:03 -08: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 9273b1789b Merge branch '1.5.x' 2016-11-18 16:41:22 +00: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 ae8ad454b3 Merge branch '1.5.x' 2016-11-18 11:26:08 +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 7ebe324514 Merge branch '1.5.x' 2016-11-18 11:58:17 +09: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 cb7c0b5031 Merge branch '1.5.x' 2016-11-16 16:06:53 -08: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 4edab86ba2 Merge branch '1.5.x' 2016-11-16 09:13:32 +00: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 af82cbbfa9 Relaxed test assertion 2016-11-07 22:55:25 +01:00
Stephane Nicoll ea35da0305 Merge branch '1.5.x' 2016-11-06 11:26:58 +01: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 0cdde3b83c Merge branch '1.5.x' 2016-11-03 14:50:26 -07: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
Andy Wilkinson 4486d2d209 Upgrade to Reactor 3.0 and start building against SI 5.0 snapshots
Closes gh-7301
See gh-7029
2016-11-03 20:49:02 +00:00
Madhura Bhave 3fd586aeeb Merge remote-tracking branch 'springsource/1.5.x' 2016-11-03 10:16:45 -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
Andy Wilkinson 05732613dd Update ConditionalOnJava and its usage now that Boot requires Java 8
Closes gh-6982
2016-11-01 14:18:33 +00:00
Phillip Webb 98a3ae9ac4 Merge branch '1.5.x' 2016-10-31 23:13:37 -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 d6239b1202 Merge branch '1.5.x' 2016-10-31 16:04:01 +01: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 713f4dd723 Merge branch '1.5.x' 2016-10-31 10:18:51 +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 468a466100 Merge branch '1.5.x' 2016-10-30 11:24:57 +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 bbea134e1c Merge branch '1.5.x' 2016-10-26 11:32:53 +02: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 73b5afa56e Merge branch '1.5.x' 2016-10-24 18:08:39 +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 a4bc341028 Merge branch '1.5.x' 2016-10-18 20:45:40 +01:00
Andy Wilkinson a416f496c0 Clean up deprecation and unused code warnings 2016-10-18 20:43:05 +01:00
Andy Wilkinson 7c870ea4fb Merge branch '1.5.x' 2016-10-13 12:30:16 +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
Phillip Webb 277d01ab53 Merge branch '1.5.x' 2016-10-12 13:35:21 -07: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 01900c8342 Merge branch '1.5.x' 2016-10-11 23:42:14 -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 7f2806bd19 Merge branch '1.5.x' 2016-10-11 17:06:04 +02: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 58770e0c73 Merge branch '1.5.x' 2016-10-11 13:05:10 +01: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 097c64a91b Merge branch '1.5.x' 2016-10-10 11:37:51 +02: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 97774afebf Merge branch '1.5.x' 2016-10-10 10:43:40 +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 5a2eae5628 Merge branch '1.5.x' 2016-10-07 10:35:59 +02:00
Stephane Nicoll ed333a67b4 Expose Spring Data Rest RepositoryDetectionStrategy
Closes gh-7113
2016-10-07 10:35:48 +02:00
Stephane Nicoll 640a77fcfa Merge branch '1.5.x' 2016-10-07 09:46:39 +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 c465fcefad Merge branch '1.5.x' 2016-10-06 15:53:19 +01: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 b54566c0cd Merge branch '1.5.x' 2016-10-06 13:30:14 +02: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
Stephane Nicoll 2ff41ce9cc Merge branch '1.5.x' 2016-10-06 09:35:15 +02:00
Stephane Nicoll 200e246238 Merge branch '1.4.x' into 1.5.x 2016-10-06 09:35:01 +02:00
Johnny Lim 91254f2110 Remove unused parameters in String.format()
Closes gh-7111
2016-10-06 09:34:32 +02:00
Stephane Nicoll 8b61d15120 Remove deprecated support for commons-dbcp 1
See gh-6787
2016-10-05 15:51:14 +02:00
Stephane Nicoll 543498f040 Merge branch '1.5.x' 2016-10-05 15:21:23 +02:00
Stephane Nicoll cf28663cd7 Deprecate commons-dbcp 1
Closes gh-6787
2016-10-05 15:21:09 +02:00
Stephane Nicoll 0d5985b8dd Merge branch '1.5.x' 2016-10-04 15:01:04 +02:00
Stephane Nicoll 07690bab25 Allow customization of the auto-configured JmsTemplate
Closes gh-6825
2016-10-04 15:00:42 +02:00
Phillip Webb 53f50eda39 Merge branch '1.5.x' 2016-10-03 22:47:11 -07:00
Phillip Webb a2315378d4 Formatting 2016-10-03 22:44:36 -07:00
Phillip Webb f2b0fa284e Merge branch '1.4.x' into 1.5.x 2016-10-03 22:38:22 -07:00
Phillip Webb 3326841a97 Formatting 2016-10-03 22:19:35 -07:00
Phillip Webb 39ed0d4dfb Polish 2016-10-03 21:58:13 -07:00
Stephane Nicoll f181421f67 Merge branch '1.5.x' 2016-10-03 11:29:56 +02:00
Stephane Nicoll 8ad477537e Fail fast if both uri and client attributes are set
Previously, an URI and individual client attributes can be set to
configure the mongo client. In such a scenario, the URI is ignored.

This commit changes the URI to be "null" and the creation of the client
to fail if both the uri and client attributes are set. If no client
attributes are set, the uri is used as before.

Closes gh-6739
2016-10-03 11:29:20 +02:00
Stephane Nicoll b95b57dbf5 Merge branch '1.5.x' 2016-10-02 11:08:53 +02:00
Stephane Nicoll e643fc5bd1 Merge branch '1.4.x' into 1.5.x 2016-10-02 11:08:33 +02:00
Johnny Lim 503d735fdd Polish
Closes gh-7081
2016-10-02 11:07:04 +02:00
Stephane Nicoll 8f96278ce9 Merge branch '1.5.x' 2016-09-30 10:53:03 +02:00
Stephane Nicoll 7ffa499949 Merge branch '1.4.x' into 1.5.x 2016-09-30 10:52:44 +02:00
Stephane Nicoll e56119165e Close JestClient on shutdown
Closes gh-7051
2016-09-30 10:51:48 +02:00
Stephane Nicoll 8ed20068ca Fix list property to be mutable
Closes gh-7045
2016-09-30 10:34:25 +02:00
Andy Wilkinson f82dc8e043 Upgrade to JMS API 2.0
Closes gh-7049
2016-09-29 20:33:21 +01:00
Andy Wilkinson 241ab10160 Merge branch '1.5.x' 2016-09-29 15:49:04 +01:00
Andy Wilkinson 2a035d0748 Remove support for Velocity following its deprecation in 1.4
Closes gh-6971
2016-09-29 15:44:36 +01:00
Andy Wilkinson 464915d2cc Remove support for HornetQ following its deprecation in 1.4
See gh-6971
2016-09-29 15:44:36 +01:00
Andy Wilkinson ae7faa233a Merge branch '1.5.x' 2016-09-29 15:09:14 +01:00
Andy Wilkinson 0232e3b16c Merge branch '1.4.x' into 1.5.x 2016-09-29 15:09:08 +01:00
Andy Wilkinson d08c84af42 Ensure that JtaAutoConfiguration runs before ArtemisAutoConfiguration
Closes gh-7062
2016-09-29 15:08:24 +01:00
Andy Wilkinson 0e018c6037 Merge branch '1.5.x' 2016-09-29 15:02:02 +01:00
Andy Wilkinson b4d052a7b3 Merge branch '1.4.x' into 1.5.x 2016-09-29 15:01:54 +01:00
Andy Wilkinson 33ea73996e Make auto-config for Narayana back off when Transaction SPI not on classpath
Closes gh-7061
2016-09-29 14:56:05 +01:00
Stephane Nicoll 8b6d7eedc0 Merge branch '1.5.x' 2016-09-29 10:38:42 +02:00
Vedran Pavic c4aa78679a Upgrade Hazelcast to 3.7.1
In addition, dependency management for `hazelcast-hibernate5` module has
been added, and a separate dependency version was introduced for
`hazelcast-hibernate4` module.

Closes gh-7023
2016-09-29 10:37:29 +02:00
Stephane Nicoll 49a606fa91 Merge branch '1.5.x' 2016-09-28 17:00:56 +02:00
Stephane Nicoll cdd59707fc Merge branch '1.4.x' into 1.5.x 2016-09-28 17:00:30 +02:00
Johnny Lim 30a677646f Polish
Closes gh-7030
2016-09-28 16:45:19 +02:00
Andy Wilkinson 63796a2a82 Merge branch '1.5.x' 2016-09-28 11:12:04 +01:00
Vedran Pavic f485660482 Upgrade Spring Session to 1.3.0.M2
Closes gh-6979
2016-09-28 11:07:11 +01:00
Stephane Nicoll 133739b222 Merge branch '1.5.x' 2016-09-26 10:47:31 +02:00
Stephane Nicoll 7dfa3a8c83 Harmonize Caffeine CacheManager bean name
Closes gh-6980
2016-09-26 10:47:09 +02:00
Andy Wilkinson aaf435ff2a Suppress Neo4J-related deprecation warnings
See gh-6976
2016-09-21 20:57:05 +01:00
Andy Wilkinson 08842c1273 Suppress Neo4J-related deprecation warnings
See gh-6976
2016-09-21 19:52:18 +01:00
Andy Wilkinson 0cdbbd49b5 Address warnings caused by deprecations in Spring Framework 5
See gh-6977
2016-09-21 17:34:54 +01:00
Andy Wilkinson 16a0f72df5 Merge branch '1.5.x' 2016-09-21 17:03:35 +01:00
Andy Wilkinson c108da9d53 Upgrade to Spring Data Ingalls M1
Closes gh-6785
Closes gh-5835
2016-09-21 17:01:47 +01:00
Stephane Nicoll 9bc77254a7 Start building against Spring Framework 5 snapshot
This commit enables compatibility build against Spring Framework 5.

The Velocity and Guava support that are deprecated in the 1.x line have
been removed and few other classes contain minor change to comply to non
backward compatible changes in Spring Framework 5.

This commit also switches the required java version to 8.

Closes gh-6977
2016-09-21 17:37:02 +02:00
Stephane Nicoll 6643ec3713 Next development version 2016-09-21 17:05:50 +02:00
Stephane Nicoll bd7c20eb1c Deprecate Guava support 2016-09-21 14:59:02 +02:00
Stephane Nicoll ce1e41dce3 Remove deprecated code
This code removes code deprecated in 1.4 with the exception of code that
requires an update to Spring Framework 5.

Closes gh-6971
2016-09-21 14:30:28 +02:00
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Spring Buildmaster 7e9ed5e1a7 Next Development Version 2016-09-21 07:58:07 +00:00
Phillip Webb 51092af739 Polish 2016-09-20 14:32:09 -07:00
Eddú Meléndez bc55b6e0d4 Add contextPath LocalHostUriTemplateHandler URIs
Update `LocalHostUriTemplateHandler` so that the `server.context-path`
property is also considered when building the URL.

Fixes gh-6904
Closes gh-6919
2016-09-17 19:33:06 -07:00
Phillip Webb 0eab3e0c5a Drop printed link to reference documentation
Tweak the fix from 50c68a49 to no longer print a link the reference
documentation.

See gh-6593
2016-09-16 17:52:25 -07:00
Phillip Webb 825dd0a26c Merge branch '1.3.x' 2016-09-16 15:07:18 -07:00
Phillip Webb b97e0bd471 Allow HttpPutFormContentFilter to be disabled
Add `spring.mvc.formcontent.putfilter.enabled` property to allow the
HttpPutFormContentFilter to be disabled.

Fixes gh-6519
2016-09-16 14:14:21 -07:00
Phillip Webb a2e4127d4f Fix multi-annotation nested condition logic
Update `AbstractNestedCondition` to correctly group nested conditions
on members.

Fixes gh-6672
2016-09-16 13:31:55 -07:00
Stephane Nicoll 50c68a497b Improve startup error message
This commit improves the startup error message so that it does not
reference  `--debug` anymore. Such command-line switch only works when
the application is started using `java -jar`.

The error message now refers directly to a section of the documentation
that provides more details and links to more useful examples.

Closes gh-6593
2016-09-16 16:37:50 +02:00
Stephane Nicoll 78bb04f2c1 Polish 2016-09-16 14:54:11 +02:00
Stephane Nicoll 284988f0cd Clarify SpringBootWebSecurityConfiguration scope
This commit fixes the documentation that wrongly states that
SpringBootWebSecurityConfiguration is an auto-configuration. Rather than
excluding this class, we should exclude SecurityAutoConfiguration that
imports it.

Closes gh-6861
2016-09-16 14:53:50 +02:00
Oliver Gierke 0860ad4fd4 Use default simple types with MongoMappingContext
Change the auto-configure MongoMappingContext to use the
SimpleTypesHolder instance `Set` that's produced by a CustomConversions
bean, which we in turn now default, too.

This update is necessary as `CustomConversions` registers converters by
inspecting the classpath (to automatically detect Java 8, JodaTime etc.)
and by that rendering the types for which we find converters for as
simple ones, i.e. non-entities.

Fixes gh-6881
Closes gh-6882
2016-09-15 10:42:59 -07:00
Phillip Webb dcfe2673fd Fix failing test following Tomcat upgrade
Tomcat 8.5.5 has change the default value of `validationInterval` to
3000. See https://bz.apache.org/bugzilla/show_bug.cgi?id=59923 for
details.

See gh-6703
See gh-6657
2016-09-14 17:14:37 -07:00
Johnny Lim caa4c0800f Polish
Closes gh-6872
2016-09-13 09:25:06 +02:00
Phillip Webb c56f30fd91 Formatting 2016-09-12 12:44:31 -07:00
Stephane Nicoll ee668e6782 Polish contribution
Closes gh-6651
2016-09-12 14:53:02 +02:00
Vedran Pavic 06a1f44128 Validate Spring Batch database initializer configuration
This commit adds Spring Batch configuration validation that disables
database initializer in case custom table prefix is configured with
default schema.

See gh-6651
2016-09-12 14:42:07 +02:00
Stephane Nicoll def40bf27f Polish 2016-09-12 14:36:12 +02:00
Stephane Nicoll a347a780e7 Polish contribution
Closes gh-6649
2016-09-12 14:34:40 +02:00
Vedran Pavic 9141177f1a Validate Spring Session database initializer configuration
This commit adds Spring Session JDBC configuration validation that
disables database initializer in case custom table name is configured
with default schema.

See gh-6649
2016-09-12 14:11:00 +02:00
Phillip Webb 56544c8dd5 Polish 2016-09-09 10:27:44 -07:00
Brian Clozel 274734e787 Add `spring.thymeleaf.check-template` property
This commit adds a new `spring.thymeleaf.check-template` property which
is only used for Thymeleaf 3.0+.

Since thymeleaf/thymeleaf#419, the Thymeleaf template resolver
implementations can implement the `setCheckExistence` method - this
enables the template existence verification at **resolution** time,
which means the resolver can return null as a `TemplateResolution`
and let other template resolvers in the chain try.

This new property is set to `true` by default and can be disabled if the
application only has a single resolver and the template existence check
is considered as a performance penalty with the configured resolver.

Fixes gh-6500
2016-09-09 16:35:57 +02:00
making 8a5c026a9d Add spring.http.multipart.resolve-lazily
This commit adds the `spring.http.multipart.resolve-lazily`
property, in order to configure whether the multipart request
should be resolved lazily, as the parameters are accessed.
2016-09-09 10:34:49 +02:00
Stephane Nicoll b450fece2e Add NoSuchBeanDefinitionException failure analyzer
Add a `FailureAnalyzer` that handles the case where the context does
not start because no candidate bean was found for an `InjectionPoint`.

The implementation inspects the auto-configuration report for beans
that are candidate and output the condition(s) that lead to such beans
to be discarded on startup. If a whole auto-configuration class is
disabled (or excluded), its beans are inspected and candidates are
extracted in a similar way.

This works for both injection by type and by name.

Closes gh-6612
2016-09-07 16:50:25 -07:00
Phillip Webb 7396ccfe04 Harmonize ConditionOutcome messages
Add ConditionMessage class to help build condition messages in a
uniform format and update existing conditions to use it.

Fixes gh-6756
2016-09-07 10:50:39 -07:00
Johnny Lim 4b9f6869f0 Polish
Closes gh-6817
2016-09-05 09:08:08 +02:00
Andy Wilkinson 2e1988f97e Rework welcome page so that it only handles reqs that accept text/html
Closes gh-6668
2016-08-31 19:26:17 +01:00
Andy Wilkinson 3814e509a3 Polish @deprecated javadoc and link to replacements where available
Closes gh-6765
2016-08-31 14:34:49 +01:00
Andy Wilkinson d720645275 Polishing
Fix mistake introduced during forward merge
2016-08-31 14:06:37 +01:00
Phillip Webb 2a22a7af12 Remove ApplicationInfo
Rework commit 4a69755b to remove the need for the ApplicationInfo class.
The updated code now uses the auto-configuration class to compute a
default persistence unit root location

Closes gh-6635
2016-08-31 14:49:15 +02:00
Andy Wilkinson b488a3d9a3 Merge branch '1.3.x' 2016-08-31 13:30:39 +01:00
Andy Wilkinson 63b8e82c10 Update OnBeanCondition to consider hierarchy for PARENTS search strategy
Closes gh-6762
2016-08-31 13:28:08 +01:00
Phillip Webb 565ad79856 Polish 2016-08-29 20:26:30 +01:00
Phillip Webb 850141c405 Merge branch '1.3.x' 2016-08-29 15:30:30 +01:00
Phillip Webb 69e96c6211 Polish 2016-08-29 15:29:54 +01:00
Andy Wilkinson 55f6fb94ef Merge branch '1.3.x' 2016-08-26 17:32:50 +01:00
Andy Wilkinson a5c6b0954d Consider ancestors when finding primary beans for ConditionalOnSingleCandidate
Closes gh-6559
2016-08-26 17:29:47 +01:00
Andy Wilkinson 6df279d3a1 Merge branch '1.3.x' 2016-08-26 14:30:49 +01:00
Andy Wilkinson 75c1e50c5a Improve type determination for factory beans during condition evaluation
Previously, BeanTypeRegistry did not correctly determine the type
that would be created by a factory bean if that factory bean was
returned from a bean method with arguments on a configuration class
found via component scanning.

The key difference is that bean definitions for bean methods on
configuration classes found via component scanning use ASM-based
metadata rather than reflection-based metadata. The ASM-based method
data does not provide direct access to the Method that will create the
bean. In this case, BeanTypeRegistry was falling back to looking for
a method with the matching name and no arguments. Therefore, if
the bean method had any arguments it would fail to find the method
and would, therefore, be unable to determine the type of bean
produced by the factory bean.

This commit updates BeanTypeRegistry to use logic that is very similar
to Spring Framework's ConstructorResolver's
resolveFactoryMethodIfPossible method to locate the method that will
produce the factory bean. It looks for a single method with
the required name with any number of arguments. If it finds multiple
methods with the required name and different arguments it returns
null, just as ConstructorResolver does.

Closes gh-6755
2016-08-26 13:46:56 +01:00
Stephane Nicoll 47c568a24d Polish contribution
Closes gh-6746
2016-08-26 14:24:19 +02:00
Caleb Cushing bb7b789cd9 Detect Neo4j bolt driver
Closes gh-6690
2016-08-26 13:44:02 +02:00
Stephane Nicoll b9104c9337 Restore support for empty persistence unit with fat jars
Due to the layout format change in 1.4, Spring Framework is no longer
able to compute a default persistence unit root URL. If a Spring Boot 1.4
application has JPA but does not have any entity, the application started
from a fat jar now fails with a quite cryptic exception.

This commit introduces `ApplicationInfo` as a general replacement for
the `ApplicationArguments` and `Banner` singleton beans that
`SpringApplication` registers on startup. `ApplicationInfo` also defines
the detected "main" `Class` that can be used to compute a last resort
URL that makes sense.

If such bean is available, `EntityManagerFactoryBuilder` now sets the
default persistence unit root location, preventing Spring Framework to
attempt to resolve an unknown location. Note that in our case the
persistence unit root location is actually useless: given the way the
persistence unit is created, nothing actually uses it but Hibernate, as a
compliant JPA provider, has to make sure this setting is set to a valid
URL nevertheless.

Closes gh-6635
2016-08-26 13:38:17 +02:00
Stephane Nicoll 86757efcdf Add FailureAnalyzer for Hikari
Hikari can configure both an underlying Driver or DataSource. Spring Boot
only supports the former so any attempt to trigger the creation of the
latter will lead to an exception since the auto-configuration has set
driver-specific field.

This commit adds an analyzer that intercepts such faulty scenario and
indicate that users should configure Hikari with an underlying DataSource
themselves.

Closes gh-6568
2016-08-26 11:31:46 +02:00
Johnny Lim 524edaea51 Polish
Closes gh-6728
2016-08-23 15:13:33 +02:00
Stephane Nicoll 6c1b46e162 Mark auto-configured `JdbcTemplate` as primary
This commit marks the auto-configured `JdbcTemplate` as `Primary`. Spring
session creates its own so we could end up with two in a fully auto
configured context.

Closes gh-6717
2016-08-23 10:42:55 +02:00
Andy Wilkinson e465368f54 Ensure that access log is flushed periodically
Previously, Tomcat’s background processing was only enabled on the
context but access logging was configured on the engine. This means that
the access log valve’s background processing method was never called
and, therefore, that it wasn’t flushed periodically.

This commit moves the enablement of background processing up to the
engine, thereby ensuring that the access log is flushed periodically.
Background processing cascades down the container hierarchy so, after
this change, background processing will still be performed on the
context as well.

Closes gh-6646
2016-08-22 23:01:44 +01:00
Andy Wilkinson 1dc231f771 Use Hamcrest's containsString matcher rather than Mockito's 2016-08-22 15:48:44 +01:00
Andy Wilkinson d4c9a2b271 Merge branch '1.3.x' 2016-08-22 15:07:03 +01:00
Andy Wilkinson ba51dc5c4a Make configuration of Liquibase’s logging more robust
We make Liquibase aware of our custom Commons Logging-based logger by
adding its package to the Liquibase ServiceLocator’s packages to scan.
Previously, this was happening too late so Liquibase may have already
initialized and cached a particular logger.

This commit moves the registration of the extra package from the
Liquibase auto-configuration to the application listener that customises
Liquibase’s ServiceLocator. This ensures that the package is added
before Liquibase is used. Unfortunately, configuring Liquibase’s
ServiceLocator and its packages to scan causes it to try to perform
some logging, resulting in it caching the wrong type of logger. We
work around this problem by resetting Liquibase’s LogFactory once we’ve
finished setting everything up.

Closes gh-6713
2016-08-22 14:58:34 +01:00
Stephane Nicoll c9a3880f27 Remove hard-coded property values
As of Spring Boot 1.4, IDEs are supposed to provide auto-completion for
hints and enum values. This commit removes the hard-coded copy of
allowed values for enum-based properties. This was mostly the case
already and this commit fixes the few ones remaining.

Closes gh-6654
2016-08-22 15:39:41 +02:00
Stephane Nicoll 54a3ce8827 Restore support for spring.datasource.type
This commit restores the support of "spring.datasource.type". If this
property is set to an unsupported `DataSource` implementation, we now
properly create it again, rather than ignoring it because its value did
not match any value we support.

Since Spring Boot 1.4 now redirects `DataSource` implementation settings
to dedicated namespaces, the documentation has been updated to explicitly
mention how one can create such arrangement for an unsupported
implementation.

As a convenience, `DataSourceProperties` can initialize a
`DataSourceBuilder` based on its internal state, making it very easy for
anyone to create a `DataSource` from a `DataSourceProperties` instance.

Closes gh-6695
2016-08-22 11:49:32 +02:00
Stephane Nicoll a6ef3741ef Configure Undertow's access log prefix and suffix
This commit adds two properties that can be used to customize the prefix
and suffix of the Undertow's access log.

Closes gh-6652
2016-08-22 10:12:26 +02:00
Johnny Lim 37c8c3669b Polish
Closes gh-6671
2016-08-17 10:49:04 +02:00
Stephane Nicoll 919d6b4b2e Avoid extending from RepositoryRestMvcConfiguration
This commit moves Spring Boot's customizations for Spring Data Rest to
the existing SpringBootRepositoryRestConfigurer.

Closes gh-6581
2016-08-16 17:54:51 +02:00
Stephane Nicoll 79b0d14504 Fix wrong use of slf4j
Closes gh-6650
2016-08-15 11:44:57 +02:00
Andy Wilkinson c542d87c61 Verify that @FlywayDataSource is preferred over any "normal" DataSource 2016-08-12 13:17:09 +01:00
Andy Wilkinson 7c54c3ff21 Ensure that @LiquibaseDataSource is preferred to “normal” DataSource
Closes gh-6604
2016-08-12 13:13:57 +01:00
Eddú Meléndez 8424965a10 Allow a DataSource to be marked as being specifically for Liquibase
This commit allows to configure a special DataSource to be used by
Liquibase by annotating it with @LiquibaseDataSource.

Closes gh-6614
2016-08-12 13:11:37 +01:00
Andy Wilkinson ec9549f01f Downgrade to Jackson 2.7.6 and verify Elasticsearch’s compatibility
Closes gh-6508
2016-08-12 11:49:45 +01:00
Stephane Nicoll 80a1897ccb Remove useless postgresql alias
See gh-6534
2016-08-02 15:06:02 -07:00
Stephane Nicoll 90c67daec1 Polish contribution
Closes gh-6534
2016-08-02 14:19:28 -07:00
Vedran Pavic b5e2bff1a4 Fix aliases for database names in `JdbcSessionDatabaseInitializer`
See gh-6354
2016-08-02 14:18:38 -07:00
Stephane Nicoll 3f14bdc01d Add missing type condition on JdbcTemplateAutoConfiguration
Closes gh-6499
2016-07-29 14:23:12 +02:00
Spring Buildmaster 334baaeffd Next development version 2016-07-28 19:54:01 +00:00
Spring Buildmaster a89ef5df6e Next Development Version 2016-07-28 09:18:40 +00:00
Johnny Lim 9627d0ed66 Polish
Closes gh-6487
2016-07-27 12:29:33 +01:00
Phillip Webb 162b9e84a3 Polish 2016-07-26 22:47:51 -07:00
Brian Clozel a282710fc9 Add Locale to Charset Mapping for Servlet containers
This commit adds a new configuration key:

    spring.http.encoding.mapping.<locale>=<charset>

This allows to specify which default charset should be used for any
given Locale, if none has been provided already in the response itself.
This applies to all supported embedded servlet containers.

Fixes gh-6453
2016-07-26 12:17:11 +02:00
Kazuki Shimizu 5ecb68b226 Add JdbcTemplate only on single DataSource
Update auto-configuration logic so that a `JdbcTemplate`
is only added when there is a single candidate DataSource bean.

Closes gh-6449
2016-07-25 16:59:53 -07:00
Kazuki Shimizu e0adacbeae Add TransactionManager only on single DataSource
Update auto-configuration logic so that a `DataSourceTransactionManager`
is only added when there is a single candidate DataSource bean.

See gh-6449
2016-07-25 16:59:30 -07:00
Andy Wilkinson fbf291ee12 Make RabbitProperties’ parsed address behaviour the same for all properties
Prior to this commit parsing addresses had an inconsistent effect on the
various properties that can be contained in an address (host, port,
username, password, and virtual host).

Three different approaches were used:

1. Return the property if no addresses were set. If there was one
   address set, return the property from the address. Otherwise return
   null. (host)
2. Return the property if no address were set, otherwise return the
   property from the first address (port)
3. Return the property if no addresses were set, otherwise return the
   property from the last address that had such property (username,
   password, virtual host).

This commit aims to make the behaviour consistent. If no addresses
were set the property is returned. Otherwise the value extracted from
the first address is returned. If the first address has no such value
the property is returned.

Closes gh-6424
2016-07-21 13:48:57 +01:00
Phillip Webb 1080b990e8 Revert "Restore DataSourceProperties get...() methods"
This reverts commit 037e697406.

See gh-6406
2016-07-19 08:53:42 -07:00
Stephane Nicoll b86241cae0 Upgrade to Ehcache 3.1.1
Closes gh-6418
2016-07-19 11:35:57 +02:00
Christoffer Sawicki 3a8cf7ac8a Register valves at the engine level
Update `ServerProperties` to register `AccessLogValve` and
`RemoteIpValve` at the engine level.

Closes gh-6311
2016-07-18 15:37:34 -07:00
Phillip Webb e03e109874 Polish 2016-07-18 11:27:55 -07:00
Phillip Webb 037e697406 Restore DataSourceProperties get...() methods
Restore original get method functionality in DataSourceProperties in
a deprecated form.

Fixes gh-6406
2016-07-18 11:16:33 -07:00
Phillip Webb c889c09066 Refactor from deprecated getAliasedStringArray
Update EntityScanPackages to make use of Spring Framework's updated
alias support with ASM reading.

Closes gh-6337
2016-07-15 16:18:20 -07:00
Phillip Webb 68b9792ed6 Fix FixedAuthoritiesExtractor map extract bug
Fix issue where FixedAuthoritiesExtractor would fail to obtain standard
item from the map because an incorrect key was used.

Fixes gh-6396
2016-07-15 13:01:43 -07:00
Andy Wilkinson b8ad9537a6 Merge branch '1.3.x 2016-07-13 09:56:00 +01:00
Andy Wilkinson 68fb5789ca Create one SpringApplicationAdminMXBeanRegistrar per context hierarchy
Previously, one SpringApplicationAdminMXBeanRegistrar was created
per context. When there was more then one context this would result
in a javax.management.InstanceAlreadyExistsException being thrown
as an attempt was made to register the MBean more than once.

This commit updates SpringApplicationAdminJmxAutoConfiguration so
that the registrar is only created when there's no such existing bean
in the context hierarchy.

Closes gh-6378
2016-07-13 09:52:23 +01:00
Stephane Nicoll 6bd7a2fedd Deprecate HornetQ support
Closes gh-6377
2016-07-13 10:06:19 +02:00
Andy Wilkinson db83e89922 Add support for Thymeleaf 3 while keeping Thymeleaf 2 as the default
Closes gh-4393
2016-07-12 23:02:04 +01:00
Johnny Lim a9f6ae4422 Polish
Closes gh-6374
2016-07-12 08:46:58 +02:00
Stephane Nicoll 17b71df2dd Merge branch '1.3.x' 2016-07-07 15:38:37 +02:00
Stephane Nicoll bbb29dd70f Remove `@Primary` from `IntegrationMBeanExporter`
Commit 3ea84f9e1 has wrongly introduced a `@Primary` marker on
`IntegrationMBeanExporter` so any use of both Spring's JMX support
and Spring Integration's JMX support leads to an exception. This commit
makes sure to remove the unnecessary `@Primary`

Closes gh-6328
2016-07-07 15:36:02 +02:00
Stephane Nicoll 0356be7b95 Refine AliasFor usage
This commit makes sure to use `getAliasedStringArray` rather than
`getStringArray` as the latter does not work with ASM. While this will
probably be fixed in the core framework, this commit also adds dedicated
tests with ASM to ensure that the code works as expected.

Closes gh-6337
2016-07-07 11:47:24 +02:00
Phillip Webb f4df9d9767 Use lexical ordered DataSourceInitializer patterns
Align DataSourceInitializer to Spring Framework by lexically sorting
resolved resource patterns.

Fixes gh-6316
2016-07-06 17:11:30 -07:00
Stephane Nicoll 05dad45172 Add proxy configuration for Jest client
Closes gh-6332
2016-07-06 14:43:30 +02:00
Spring Buildmaster 2216369348 Next Development Version 2016-07-04 14:15:02 +00:00
Andy Wilkinson 8cbe30ab5e Ensure that Jersey and Jackson honour JAXB annotations
By default Jersey configures Jackson to use both Jackson annotations
and JAXB annotations when introspective types for (de)serialization.
However, the changes made in 5776d6a8 mean that Jersey no longer uses
its default ObjectMapper configuration and uses the auto-configured
ObjectMapper instead. This had the unwanted side-effect of leaving
Jersey with an ObjectMapper that only uses Jackson annotations and
ignores JAXB annotations.

This commit updates JerseyAutoConfiguration so that it will add the
JaxbAnnotationIntrospector to the auto-configured ObjectMapper for
both serialization and deserialization. It uses
AnnotationIntrospectorPair to ensure retain any existing
introspectors.

Closes gh-6310
2016-07-04 14:44:31 +01:00
Andy Wilkinson 4697432edd Upgrade to Artemis 1.3.0
Closes gh-6282
2016-07-01 15:44:45 +01:00
Phillip Webb ebdacfabc3 Polish 2016-06-30 17:15:27 -07:00
Stephane Nicoll 2fea5a869d Polish "Add Spring Session JDBC database initializer"
Closes gh-5879
2016-06-30 15:23:54 +02:00
Vedran Pavic a251ea8bc7 Add Spring Session JDBC database initializer
See gh-5879
2016-06-30 15:23:54 +02:00
Andy Wilkinson 2b970f9efc Allow Tomcat context root redirect to be configured via the environment
This commit adds a new property, server.tomcat.redirect-context-root,
that can be used to configure the Tomcat Context’s 
mapperContextRootRedirectEnabled property. The default is to not apply
any configuration and, therefore, to use Tomcat’s default of true.

Closes gh-6248
2016-06-30 12:47:42 +01:00
Phillip Webb d08480320b Stop RequestContextFilter initializing config
Change WebMvcAutoConfigurationAdapter.requestContextFilter() to a static
method so that the configuration class isn't needed when creating it.
This helps to prevent early initialization of beans.

See gh-6178
2016-06-29 20:14:17 -07:00
Phillip Webb 266445aaf0 Polish 2016-06-29 10:44:33 -07:00
Dave Syer d41127d3da Add javadocs to auth server config props 2016-06-29 09:11:41 -07:00
Andy Wilkinson 05b44a98e0 Simplify generics in CassandraRepositoriesAutoConfigurationTests 2016-06-29 17:05:08 +01:00
Johnny Lim 5bc9d5b380 Polish
Closes gh-6244
2016-06-29 08:08:53 +02:00
Stephane Nicoll fc4d8b99d6 Allow to configure Tomcat's renameOnRotate property
Closes gh-5981
2016-06-28 16:38:01 +02:00
Stephane Nicoll c024dc836a Support Spring Mobile for all template engines
Previously, Spring Mobile was only supported for Thymeleaf and JSPs. This
commit improves the auto-configuration to also provide device delegating
support for Freemarker, Groovy Templates and Mustache.

Closes gh-5140
2016-06-28 16:16:34 +02:00
Stephane Nicoll 397c64d256 Polish "Add schemaAction property"
Closes gh-5855
2016-06-28 10:21:48 +02:00
Mark Paluch e85cb2c4c5 Add schemaAction property to CassandraProperties
Set schemaAction property in CassandraSessionFactoryBean. Use relaxed
property resolver for enum lookup of the configured schemaAction.

See gh-5855
2016-06-28 10:21:24 +02:00
Andy Wilkinson 94ba6bdae2 Polish “Allow connection timeout to be configured via the environment”
- Preserve default connection timeout when server.connection-timeout
   has not been set
 - Apply standard coding conventions and formatting

See gh-6072
2016-06-27 16:56:16 +01:00
Misagh Moayyed 6007d7efc1 Allow connection timeout to be configured via the environment
Closes gh-6072
2016-06-27 16:56:16 +01:00
Stephane Nicoll 0de5988c0e Use Mongo 3.0 specific API
See gh-6176
2016-06-27 15:28:08 +02:00
Stephane Nicoll 958a0a45f1 Merge branch '1.3.x' 2016-06-27 15:21:03 +02:00
Stephane Nicoll 4e07003e1d Polish "Use missing MongoClientOptions in MongoProperties"
Closes gh-6176
2016-06-27 15:14:24 +02:00
Nasko Vasilev 59f9cfb8a6 Use missing MongoClientOptions in MongoProperties
See gh-6176
2016-06-27 15:14:08 +02:00
Stephane Nicoll 33b1f52fa5 Merge branch '1.3.x' 2016-06-27 14:56:26 +02:00
Stephane Nicoll 7a5fabf59d Polish "Add condition on MongoClientFactoryBean"
Closes gh-6203
2016-06-27 14:55:47 +02:00
Julien May 2003c5e1ae Add condition on MongoClientFactoryBean
This commit makes sure that the condition that links a `MongoClient` to
the embedded mongo server kicks in only if `MongoClientFactoryBean` is
also on the classpath.

Previously, only a condition on the mongo driver existed, leading to
`ClassNotFoundException` if Spring Data MongoDB wasn't available.

See gh-6203
2016-06-27 14:39:20 +02:00
Stephane Nicoll 5656e83ba9 Enable logging of resolved exceptions
Previously, if an exception was resolved by a `HandlerExceptionResolver`
nothing the log indicated a failure to process the query.

This commit adds a new property `spring.mvc.log-resolved-exception` that
enables warning logs for supported `HandlerExceptionResolver` instances.

When Devtools is enabled, this flag is enabled by default.

Closes gh-2176
2016-06-27 14:37:44 +02:00
Johnny Lim 301574de09 Polish
Closes gh-6234
2016-06-27 14:19:26 +02:00
Phillip Webb 654801083b Provide unified @EntityScan annotation
Add a new `@EntiyScan` annotation that's used by auto-configuration to:
* Set JPA packagesToScan.
* Set Neo4J's SessionFactory packages.
* Set the initial entity set for Spring Data MongoDB, Cassandra and
  Couchbase mapping contexts.

Additionally deprecate `@org.springframework.boot.orm.jpa.EntityScan`.

See gh-6142
2016-06-24 12:49:12 -07:00
Phillip Webb 15670b8e28 Relocate Neo4J auto-configuration
Move Neo4J auto-configuration from `autoconfigure.neo4j` to
`autoconfigure.data.neo4j` since it's intrinsically linked to Spring
Data.

See gh-5458
See gh-6142
2016-06-24 12:49:11 -07:00
Phillip Webb c22a0e90a2 Polish 2016-06-24 11:52:43 -07:00
Stephane Nicoll 2dc6e5b6fa Refactor Jest auto-configuration package space
This commit moves the Jest auto-configuration from `spring.jest` to
`spring.elasticsearch.jest`

Closes gh-6032
2016-06-23 10:39:16 +02:00
Phillip Webb 5182bc4f2b Improve startup times
Improve startup times (although not by much) by adding more background
pre-initializers and lazily evaluating the whitelabel SpEL view.

See gh-6177
2016-06-22 20:37:59 -07:00
Johnny Lim e0389cb9d8 Remove unnecessary constructor
Closes gh-6202
2016-06-22 14:02:37 +02:00
Andy Wilkinson 52e8ad4b6b Drop back to Hibernate 5.0.9.Final
The upgrade to Hibernate 5.2.0.Final has provide to be too
problematic to live with. It requires Java 8, is incompatible with
a number of other projects in the Hibernate ecosystem, and it's
unclear for how long it will be maintained. We'd previously used
Hibernate 5.1.0.Final but its maintenance is also unclear with
Hibernate 5.1.1.Final being more than 3 months overdue.

This commit drops back to Hibernate 5.0.9.Final. This has a few
advantages:

- It's Java 7 compatible
- It's had some time to mature and should be reasonably free of
  regressions for those moving from 4.3.x
- It's used in both Wildfly and JBoss EAP so there's a fair chance
  that it will continue to be maintained.

Closes gh-6198
2016-06-21 20:09:21 +01:00
Phillip Webb 7446235ff4 Polish 2016-06-20 20:13:13 -07:00
Phillip Webb c136054e69 Merge branch '1.3.x' 2016-06-20 18:54:01 -07:00
Phillip Webb 5b97981c87 Polish 2016-06-20 18:13:43 -07:00
Andy Wilkinson 2c8eaac78c Update documentation of server.server-header for changes in 3009e51
See gh-4730
2016-06-20 15:25:01 +01:00
Andy Wilkinson 5e4f84cf46 Allow maximum HTTP header size to be configured when using Jetty 8
Closes gh-6190
2016-06-20 14:12:49 +01:00
Stephane Nicoll e383752150 Merge branch '1.3.x' 2016-06-20 10:14:25 +02:00
Artem Bilan 3ea84f9e1d Fix relaxed binding of SI JMX config
Instead of using an expression for JMX-related properties, this commit
properly honors relaxed binding.

Closes gh-6184
2016-06-20 10:04:38 +02:00
Stephane Nicoll 976f0a7a80 Fix build failure
Fixing #5939 lead to a build failure as OAuth2 related configuration was
defined twice. This is also related to #5973.
2016-06-20 09:47:41 +02:00
Stephane Nicoll bce6bd6594 Polish 2016-06-17 14:35:19 +02:00
Stephane Nicoll 7b5df365d8 Enable SSL from MongoClientOptions
Closes gh-5099
2016-06-17 14:33:40 +02:00
Stephane Nicoll 2ff9e3cfdc Upgrade to Hibernate 5.2
See gh-6111
2016-06-17 11:14:35 +02:00
Stephane Nicoll a273d8d0c8 Add secured connection support to Artemis
This commit aligns the feature introduced in gh-6071 to Artemis.

Closes gh-6179
2016-06-17 10:30:43 +02:00
Stephane Nicoll 8b79c667a7 Polish "Secured HornetQ" contribution
Closes gh-6071
2016-06-16 19:09:35 +02:00
Stéphane Lagraulet 1aa8f49001 Add a secured connection factory for Hornetq.
See gh-6071
2016-06-16 17:58:53 +02:00
Stephane Nicoll d54474b81c Allow locale to be overridden by "Accept-Language"
Previously, when `spring.mvc.locale` was specified, that locale was used
regardless of the client's preferences. This commit adds an extra
`spring.mvc.locale-resolver` property that can control how the locale is
resolved. The default is `ACCEPT_HEADER` but can be set to `FIXED` to
restore the previous behaviour.

Closes gh-6083
2016-06-16 14:48:55 +02:00
Dave Syer a3b29b0e42 Add /webjars/** to default list of unsecured resources
Fixes gh-2460
2016-06-14 10:31:39 +01:00
Dave Syer 6b6f4e2263 Fix JSON syntax
(according to Eclipse it was broken)
2016-06-14 09:56:00 +01:00
Stephane Nicoll 7afe1d16a6 Add Jest support
This commit adds auto-configuration support for Jest, an HTTP client for
Elasticsearch. If Jest is present, a `JestClient` targeting a local
elasticsearch instance is auto-configured. Several properties from the
`spring.jest.*` namespace allows to tune the client.

Closes gh-6032
2016-06-13 15:25:10 +02:00
Phillip Webb e27bc9ddea Merge branch '1.3.x' 2016-06-10 17:24:02 -07:00
Phillip Webb ed6f11d60d Polish 2016-06-10 11:46:26 -07:00
Brian Clozel 6dc0ecb182 Add WebMvcRegistrations for custom MVC components
Add `WebMvcRegistrations` which can be used to provide custom
instances of `RequestMappingHandlerMapping`,
`RequestMappingHandlerAdapter` and `ExceptionHandlerExceptionResolver`.
Those instances are then used and processed by the Boot MVC
configuration.

Prior to this commit, developers could provide their custom instances
of MVC infrstructure components such as `RequestMappingHandlerMapping`
and `RequestMappingHandlerAdapter` only by using advanced configuration
strategies. Those advanced configurations involved subclassing
`WebMvcConfigurationSupport` which effectively turns off MVC
auto-configuration in Boot.

Fixes gh-5004
Closes gh-6100
2016-06-10 10:40:06 -07:00
Phillip Webb 99c6194e17 Don't use MockitoJUnitRunner
Replace `@RunWith(MockitoJUnitRunner.class)` with direct Mockito
initialization since the running doesn't support parallel test
execution.
2016-06-09 20:55:59 -07:00
Stephane Nicoll 8ea5524d6a Polish 2016-06-09 15:30:28 +02:00
Stephane Nicoll 72e4064230 Merge branch '1.3.x' 2016-06-09 14:17:49 +02:00
Vedran Pavic 6dde498b87 Update DataSourceBuilder aliases
This commit adds a `user` alias for the `username` property which permits
the use of `OracleDataSource`.

Closes gh-6124, gh-6027, gh-6125
2016-06-09 14:16:21 +02:00
Brian Clozel 091664078f Split up DispatcherServletConfiguration condition
Prior to this commit, defining a custom `DispatcherServlet` and/or a
`ServletRegistrationBean` with the default name would turn off
completely the `DispatcherServletAutoConfiguration`.

This commit splits this auto-configuration in two parts:

- First, a `DispatcherServlet` is automatically registered if no
instance is already defined with the default name.
- Then, a `ServletRegistrationBean` is registered is registered if a
`DispatcherServlet` instance exists with the default name *and* no
`ServletRegistrationBean` exists with the default name

This allows developers to register manually a `ServletRegistrationBean`
or a `DispatcherServlet` without having to redefine the whole
auto-configuration.

Fixes gh-4893
Closes gh-6108
2016-06-08 14:10:53 -07:00
Phillip Webb 0fa4d2e260 Make SocialAutoConfigurerAdapter/Properties public
Fixes gh-6078
2016-06-06 19:39:46 -07:00
Johnny Lim 5de9516255 Fix typos
Closes gh-6114
2016-06-03 07:20:39 -04:00
Phillip Webb b38231021d Provide web client Auto-configuration
Add auto-configuration for use with typical web clients. Currently
client auto-configuration consists of a RestTemplateBuilder
pre-configured with HttpMessageConverters.

Closes gh-5507
2016-05-31 09:52:19 -07:00
Phillip Webb bc6f1cfdf3 Polish 2016-05-31 09:22:42 -07:00
Andy Wilkinson 73b01cff4f Use spring.factories to declare each test slice's auto-config imports
Closes gh-6001
2016-05-27 17:04:48 +01:00
Andy Wilkinson 8c9c649805 Fix MongoPropertiesTests following upgrade to Mongo 3.2 (6f5bd2e)
See gh-3011
2016-05-26 14:42:39 +01:00
Johnny Lim 70adefc87b Polish
Closes gh-6046
2016-05-26 14:58:41 +02:00
Andy Wilkinson 6f5bd2e13a Upgrade to MongoDB 3
This commit upgrades to MongoDB 3. Dependency management has been added
for the new and preferred mongodb-driver artifact. The starter has
been updated to use this new artifact rather than monogo-java-driver.
Dependency management for mongo-java-driver has been retained to avoid
causing problems for people who have declared the dependency explicitly.
The auto-configuration for Embedded Mongo has also been updated to
use 3.2.2 by default.

Closes gh-3011
2016-05-26 13:57:12 +01:00
Phillip Webb ccdcad757a Allow template lookup caching to be disabled
Extract TemplateAvailabilityProvider caching logic to a new
TemplateAvailabilityProviders class and provide property support to
disable it. Also update DevToolsPropertyDefaultsPostProcessor to
automatically set the property.

Fixes gh-5989
2016-05-25 20:46:01 -07:00
Stephane Nicoll c3201a1e91 Revert "Cache resolved error template view names"
See gh-5989
2016-05-18 17:56:27 +02:00
Stephane Nicoll dcf3a56bd5 Polish 2016-05-17 09:48:59 +02:00
Stephane Nicoll 3805fc7455 Polish 2016-05-17 08:55:59 +02:00
Phillip Webb f3e630933a Add OAuth PrincipalExtractor strategy interface
Update `UserInfoTokenServices` to use a PrincipalExtractor interface
to extract the principal.

Fixes gh-5186
2016-05-16 19:21:52 -07:00
Phillip Webb 7f45485e61 Provide explicit force request/response properties
Update HttpEncodingProperties to offer explicit `force-request` and
`force-reponse` properties in additional to the existing `force`
property.

Closes gh-5459
2016-05-16 18:43:57 -07:00
Phillip Webb bcfa2e6676 Make TestRestTemplate not extend RestTemplate
Update TestRestTemplate so that it no longer directly extends
RestTemplate. Prior to this commit it was possible that TestRestTemplate
could interfere with user defined RestTemplate beans.

TestRestTemplate offers the same methods as RestTemplate so should be
a drop-in replacement. If access is needed to the actual underlying
template the `getRestTemplate()` method should be used.

Fixes gh-5915
2016-05-16 12:35:31 -07:00
Phillip Webb 00fbb5c3d9 Polish 2016-05-16 12:00:03 -07:00
Dave Syer 46134b58b8 Fix stupid checkstyle violations 2016-05-16 14:52:11 +01:00
Dave Syer 684c8c81a3 Extract user info rest template into a factory
Instead of using a @Bean, it is better to use an opaque factory
for an internal dependency that users are not going to want in
the context. OAuth2RestTemplate is a common enough bean type that
creating on in autoconfig makes it hard for users to add their own
for business use.

See gh-5967
2016-05-16 14:06:54 +01:00
Phillip Webb c15c146021 Cache resolved error template view names
Fixes gh-5933
2016-05-13 20:09:02 -07:00
Phillip Webb 6cdbdf9ad3 Polish 2016-05-13 20:09:02 -07:00
Stephane Nicoll 00f9adafd7 Stop creating a primary `Oauth2RestTemplate`
This commit removes the creation of a `@Primary` `OAuth2RestTemplate`
and updates the documentation accordingly.

Once #5507 is implemented we could revisit this area to provide a way for
users to easily create such a bean.

Closes gh-5202
2016-05-13 17:26:22 +02:00
Andy Wilkinson c11b28c3c7 Align default for OPTIONS request dispatching with Spring Framework 4.3
Closes gh-5965
2016-05-13 16:19:10 +01:00
Stephane Nicoll 2b006aacb3 Validate Spring Session has been configured
This commit validates that a `SessionRepository` has been configured if
Spring Boot is meant to auto-configure one.

Closes gh-5943
2016-05-13 12:07:40 +02:00
Stephane Nicoll 5deca28a9d Improve upgrade path for Spring Session
Commit b7e7bcf made `spring.session.store-type` explicit which means that
users of Spring Session in 1.3 have to set that property to restore the
auto-configuration support in 1.4.

This commit implicitly set the store type to redis if redis is present
and log a warning inviting the user to actually specify that in
configuration.

The entry in the auto-configuration report also mentions that such
arrangement is deprecated.

Closes gh-5838
2016-05-13 11:19:02 +02:00
Johnny Lim 7a62b7d066 Polish
Closes gh-5936
2016-05-13 08:55:28 +02:00
Kazuki Shimizu a4d9ba165f Set default paths for fixed static version
Closes gh-5878
2016-05-12 17:06:26 +01:00
Andy Wilkinson 500edeacc4 Ensure that static error pages have a Content-Type header
The getContentType() accessor method on View appears to only be used
for content negotiation. For the Content-Type header to be included in
the response the view needs to set it explicitly when render is called.

Closes gh-5918
2016-05-11 11:48:06 +01:00
Andy Wilkinson 5c0d400c23 Align Hibernate 5 join table names with those from SpringNamingStrategy
Previously, the name of a join table when using Hibernate 5 would
differ from those when using Hibernate 4 with the default
SpringNamingStrategy.

This commit introduces SpringImplicitNamingStrategy which customises the
name of join tables to match those produced by SpringNamingStrategy.

Closes gh-5880
2016-05-11 10:52:43 +01:00
Phillip Webb cf6212b955 Polish 2016-05-10 10:22:37 -07:00
Phillip Webb 6575ca6ff8 Merge branch 1.3.x 2016-05-10 09:35:49 -07:00
Phillip Webb 7fb545d26c Polish 2016-05-10 09:35:10 -07:00
Andy Wilkinson 0c2ecb7ba0 Apply standard Jackson2ObjectMapperBuilder config via a customizer
This commit builds on the new abstraction introduced in 2a0b8a7 by
applying the standard JacksonProperties-based
Jackson2ObjectMapperBuilder configuration via a customizer.

It also applies some polishing to the original contribution:

 - Code has been formatted
 - Logic that applies the customizers has moved to be alongside the code
   that creates the builder
 - Logic that explicitly sorted the customisers has been removed as
   they will be sorted automatically prior to injection
2016-05-10 14:23:33 +01:00
dziesio deb7529a36 Make it easier to customize auto-configured Jackson2ObjectMapperBuilder
Previously, it was difficult to customize the auto-configured
Jackson2ObjectMapperBuilder. Typically, use of a bean post processor
was required.

This commit introduces Jackson2ObjectMapperBuilderCustomizer. Beans
that implement this interfaces are called during creation of the
auto-configured Jackson2ObjectMapperBuilder, providing an opportunity
to customize its configuration.

Closes gh-5803
2016-05-10 14:23:33 +01:00
Andy Wilkinson 64e668d584 Use AssertJ in JooqExceptionTranslatorTests 2016-05-10 14:22:01 +01:00
Andy Wilkinson 12215533a5 Merge branch '1.3.x' 2016-05-10 13:29:17 +01:00
Andy Wilkinson 1ab835a0f7 Add tests for JooqExceptionTranslator
See gh-5884
2016-05-10 13:21:59 +01:00
tfeiner 61cb18a69c Use JOOQ's Spring DB name during exception translation
The name of a JOOQ SQLDialect does not always match the name defined
in sql-error-codes.xml. For example, the Postgres translator was not
initialized correctly because in JOOQ the dialect is named
SQLDialect.POSTGRES, but in sql-error-codes.xml the bean is named
"PostgreSQL".

This commit updates the translator to use the dialects third-party
springDbName which ensures that it maps correctly to the entries in
sql-error-codes.xml.

Closes gh-5884
2016-05-10 13:21:59 +01:00
Andy Wilkinson 0a765e36f1 Protect against stack overflow when searching meta annotations
It is legal for an annotation to be annotated with itself. Previously,
when searching for meta annotations this could lead to a stack overflow.
This was likely to occur when using Kotlin as, like Java, its Target
annotation is annotated with itself. A stack overflow doesn’t occur
with Java’s Target annotation due to some short-circuiting logic for
annotations in java.lang.

This commit updates the logic for finding meta-annotations to
short-circuit when an annotation that has already been seen is
encountered.

Closes gh-5902
2016-05-10 09:39:55 +01:00
Stephane Nicoll 699d083cec Add load-on-startup property to DispatcherServlet
Closes gh-2481
2016-05-10 08:37:23 +02:00
Spring Buildmaster 819a9574a6 Next Development Version 2016-05-10 05:28:34 +00:00
Andy Wilkinson 3348ed5bb3 Make use of new GetMapping and PostMapping annotations
Closes gh-5277
2016-05-09 17:08:16 +01:00
Stephane Nicoll 2cacc19c91 Polish
See gh-5901
2016-05-09 17:49:55 +02:00
Stephane Nicoll a4ba8f61c9 Backport 6dd8415
While working on gh-5309, a regression was introduced and fixed right the
way on master. Unfortunately, the fix wasn't applied to `1.3.x` as it
should have been.

This commit applies 6dd8415 to `1.3.x`

Closes gh-5901
2016-05-09 17:49:16 +02:00
Stephane Nicoll b7e7bcf717 Make `spring.session.store-type` mandatory
Previously, Spring Session would be auto-configured by the mere presence
of Spring Session in the classpath. This was fragile as determining a
store type according to the environment could easily change when the
classpath of the project changes.

This commit makes the store-type property mandatory. If it is not set,
Spring Session is no longer auto-configured.

Closes gh-5838
2016-05-09 08:07:25 +02:00
Spring Buildmaster 376bbe68d8 Next Development Version 2016-05-06 11:23:57 +00:00
Stephane Nicoll 21536f64e1 Polish info contributor feature
This commit improves the `InfoContributor` infrastructure as follows:

* `InfoEndpoint` no longer breaks its public API and returns a Map as
before
* `Info` is now immutable
* All properties of the build are now displayed. Since we control the
generation of that file, there is no longer a mode to restrict what's
shown
* Build info is now generated in `META-INF/build-info.properties` by
default

Closes gh-5734
2016-05-06 10:52:26 +02:00
Andy Wilkinson a245845521 Correct assertion that were inverted when converting to AssertJ
See gh-5819
2016-05-05 17:54:13 +01:00
Andy Wilkinson c76621b34d Merge branch '1.3.x' 2016-05-05 17:36:14 +01:00
Andy Wilkinson 34420a8768 Allow @ConditionalOnProperty to be used as a meta-annotation
Closes gh-5819
2016-05-05 17:33:18 +01:00
Andy Wilkinson 5b544c918d Merge branch '1.3.x' 2016-05-05 16:14:17 +01:00
Andy Wilkinson 147956a7b2 Avoid creating multiple BeanNameViewResolver beans
ErrorMvcAutoConfiguration creates a BeanNameViewResolver bean in case
the user has used @EnabledWebMvc and disabled WebMvcAutoConfiguration.
If the user hasn’t used @EnabledWebMvc, WebMvcAutoConfiguration will
creates its BeanNameViewResolver and override the one that’s already
been defined by ErrorMvcAutoConfiguration.

This commit makes WebMvcAutoConfiguration’s BeanNameViewResolver
definition conditional on there being no existing BeanNameViewResolver
bean definition.

Closes gh-5354
2016-05-05 16:10:36 +01:00
Dave Syer de6c582c9e Merge remote-tracking branch 'origin/1.3.x' 2016-05-04 21:16:32 +01:00
Dave Syer 905451f92e That BaseConfiguration thing didn't work out after all
It seems like a base class that defines `@Beans` just doesn't
define any beans. Oh well, time to copy-paste.
2016-05-04 21:01:40 +01:00
Dave Syer e58bef5f2b Merge remote-tracking branch 'origin/1.3.x' 2016-05-04 14:23:14 +01:00
Dave Syer 1babdd5c2e Remove log config for non boot things 2016-05-04 14:22:41 +01:00
Dave Syer a86796f126 Merge remote-tracking branch 'origin/1.3.x'
Conflicts:
	spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/OAuth2AutoConfigurationTests.java
2016-05-04 14:14:19 +01:00
Dave Syer e98264debf Move base configuration class to a separate file
to stop it from being included in the enclosing @Configuration.

That way, if the app is not a web app, then there really is a
client_credentials OAuth2 resource (as claimed in the user guide).

Fixes gh-5735
2016-05-04 14:02:00 +01:00
Stephane Nicoll e71cea55ba Remove useless import 2016-05-03 17:27:14 +02:00
Stephane Nicoll 428a10a7d7 Only force request encoding
A recent Spring Framework change in `CharacterEncodingFilter` allows to
configure the force flag separately for requests and responses. This
commit enables the flag only for requests which should provide a better
default with binary content.

Closes gh-5459
2016-05-03 17:24:57 +02:00
Stephane Nicoll 6f4ec4e741 Inject ApplicationEventPublisher
Previously, the auto-configured
`OAuth2ClientAuthenticationProcessingFilter` instance had no
`ApplicationEventPublisher`. As a result, no event was fired. This commit
makes sure to associate the event publisher instance.

Closes gh-5853
2016-05-03 15:44:05 +02:00
Johnny Lim 7763c2ae4c Polish
Closes gh-5843
2016-05-03 09:33:32 +02:00
Phillip Webb 2d243f0668 Don't apply multiple session configurations
Add additional @ConditionalOnMissingBean guards to session
configurations to ensure that the first wins. Also reorder imports
to prefer Redis over JDBC.

See gh-5158
2016-05-02 16:42:40 -07:00
Phillip Webb 6466c0afa5 Polish 2016-05-02 14:44:15 -07:00
Stephane Nicoll bf89c8ee46 Polish spring session auto-configuration
This commit improves the initial submission by adding more tests and
more configuration options.

Closes gh-5158
2016-05-02 15:02:53 +02:00
Eddú Meléndez 0be00e2a6d Polish session auto-configuration
See gh-5158
2016-05-02 14:33:24 +02:00
Tommy Ludwig de007840a8 Spring Session auto-configuration expansion
This implementation was inspired in large part by the cache
auto-configuration. In addition to the originally supported Redis, now
Hazelcast, an in-memory map, as well as a no-op option are supported. It
should be easy to extend this to include additional data stores in the
future.

Closes gh-3811
2016-05-02 14:33:24 +02:00
Stephane Nicoll 9059184a6a Clarify commons-pool2 requirement for redis
`JedisConnectionFactory` needs `commons-pool2` for quite some time now
and our auto-configuration had a special case to handle redis if
`commons-pool2` isn't available.

This commit removes that code as using it would lead to a failure anyway.

Closes gh-5718
2016-05-02 14:12:18 +02:00
Johnny Lim 0efa0038c3 Polish
Closes gh-5815
2016-04-30 10:24:33 +02:00
Phillip Webb 0bf025af7b Add out-of-the-box support for status error pages
Allow convention based status error pages. Static HTML or templates
can be used by placing the appropriately named file under a `/error`
folder. For example:

	/src/main/resource/templates/error/404.ftl
or	/src/main/resource/public/error/404.html

Pages can also be named after the status series (5xx or 4xx).

Fixes gh-2691
2016-04-29 14:02:59 -07:00
Phillip Webb 590bd5c084 Fixup warnings 2016-04-28 16:50:03 -07:00
Phillip Webb 08ef5f4b1f Make ErrorPageRegistry first class concern
Create ErrorPageRegistry and ErrorPageRegistrar interfaces that allow
error page registration to be a first class concern.

Prior to this commit ErrorPageFilter needed to implement
ConfigurableEmbeddedServletContainer in order to receive ErrorPage
registrations.

Closes gh-5789
2016-04-28 12:45:15 -07:00
Phillip Webb 609cb52cd4 Move to relocated web classes
Refactor code to move from recently deprecated classes.

Closes gh-5822
2016-04-28 12:45:15 -07:00
Phillip Webb aea18671c1 Restructure web related classes
Reorganize web related classes for better separation of concerns.
Mainly this involves moving classes from `o.s.b.context.embedded`
that aren't directly tied to embedded servlet containers to
`o.s.b.web` and relocating everything from `o.s.b.context.web`.

See gh-5822
2016-04-28 12:45:15 -07:00
Phillip Webb a7cb689f95 Move @LocalServerPort annotation
Move the @LocalServerPort to org.springframework.boot.context.embedded
since it's only really useful when working with embedded servlet
containers.

See gh-5822
2016-04-28 12:45:15 -07:00
Phillip Webb f468aff47f Merge remote-tracking branch '1.3.x' 2016-04-28 09:32:37 -07:00
Phillip Webb ef7b511b0e Polish 2016-04-28 09:29:49 -07:00
Dave Syer ebb0ff8638 Merge remote-tracking branch 'origin/1.3.x' 2016-04-28 10:31:14 +01:00
Dave Syer 9c0679b1f4 Add support for spring.rabbitmq.ssl.algorithm
Rabbit client 3.6.* uses TLSv1.1 as the default algorithm which
many brokers are deisabling these days. Spring AMQP supports
changing the algorithm by name, so this is just a pass thru for
that.
2016-04-28 10:27:51 +01:00
Phillip Webb 2679a6f0c6 Polish 2016-04-26 15:02:39 -07:00
Stephane Nicoll ad5674cbb0 Merge branch '1.3.x' 2016-04-26 09:27:46 +02:00
Stephane Nicoll ac8e87d79f Polish contribution
Closes gh-5782
2016-04-26 09:24:37 +02:00
Venil Noronha d5554e0aa1 Use static-locations properties to locate favicon
Closes gh-5751
2016-04-26 09:09:19 +02:00
Stephane Nicoll 1ef3327441 Move multipart.* properties to spring.http.multipart.*
Closes gh-3044
2016-04-26 08:59:41 +02:00
Stephane Nicoll 5f41e82a89 Merge branch '1.3.x' 2016-04-26 08:29:38 +02:00
Stephane Nicoll 247685e992 Add missing `@Documented`
Closes gh-5786
2016-04-26 08:29:20 +02:00
Johnny Lim db2092e27d Polish
Closes gh-5798
2016-04-26 08:17:13 +02:00
Stephane Nicoll 23f669f8f5 Polish
See gh-5791
2016-04-26 08:11:33 +02:00
Fabrizio Cucci 7859438538 Fix typo in Servlet auto-configuration Javadoc
Removed misplaced "for" in javadoc for Tomcat nested configuration.

Closes gh-5779
2016-04-25 14:22:13 -07:00
Eddú Meléndez 99b830ebe7 Support different schema/data DB script users
Allow data and/or schema scripts to be run by different database users.

Fixes gh-5402
Closes gh-5788
2016-04-25 12:37:36 -07:00
Gary Russell 12b9f0262b Add RabbitMQ Connection Timeout Property
Fixes gh-685
Closes gh-5791
2016-04-25 12:13:11 -07:00
Dave Syer 568d716c99 Move OAuth2ClientContextFilter back before the main security filter
It sometimes has to catch an exception from the security filter so
it needs to be before, and somehow this hasn't been a problem up to
now, but probably only by some fluke.

Fixes gh-5792
2016-04-25 16:44:43 +01:00
Phillip Webb 93382648ab Formatting 2016-04-24 22:54:27 -07:00
Phillip Webb 79922360e1 Polish 2016-04-24 22:49:41 -07:00
Andy Wilkinson a6bcc6f573 Update Liquibase and Flyway docs and test other changelog formats
Closes gh-5741
2016-04-21 10:22:59 +01:00
Andy Wilkinson addb69508d Perform analysis of failures caused by DataSourceBeanCreationException
Closes gh-5351
2016-04-20 17:34:44 +01:00
Johnny Lim b914b4aa52 Remove the second parameter of substring() if possible
Closes gh-5720
2016-04-20 09:18:35 +02:00
Jakub Narloch 64989ae192 Replacing StringBuffer with lock-free StringBuilder
Closes gh-5727
2016-04-19 08:01:05 +02:00
Andy Wilkinson 6d4083a718 Merge branch '1.3.x' 2016-04-18 17:32:47 +01:00
Andy Wilkinson a4d7a77547 Apply spring.thymeleaf.cache to auto-configured ThymeleafViewResolver
Previously, spring.thymeleaf.cache was only applied to auto-configured
TemplateResolver. This commit also applies the propery to the
auto-configured ThymeleafViewResolver.

Closes gh-5395
2016-04-18 17:26:13 +01:00
Johnny Lim 6d48ee9593 Polish
Closes gh-5714
2016-04-17 09:26:05 +02:00
Phillip Webb 5881c9c74f Polish 2016-04-15 22:39:35 -07:00
Stephane Nicoll f561d9d9d8 Polish auto-configuration for Spring Web Services
Closes gh-5645
2016-04-15 11:01:15 +02:00
Vedran Pavic a7b3a913c2 Add auto-configuration for Spring Web Services
Closes gh-1045
2016-04-15 09:00:09 +02:00
oEmbedler Inc af39d558ff Fix potential NPE in RedisAutoConfiguration
Closes gh-5667
2016-04-12 14:51:18 -07:00
Phillip Webb 6eeda76af7 Merge branch '1.3.x' 2016-04-12 14:50:14 -07:00
Sergey Pauk 8542f4f481 Make UserInfoTokenServices.getPrincipal protected
Update UserInfoTokenServices.getPrincipal() so that it can be overridden
by subclasses to allow a custom authenticated principal to be returned
from the authorized request parameters.

Fixes gh-5053
2016-04-12 14:40:37 -07:00
Phillip Webb c79ecc29c6 Polish 2016-04-11 11:51:09 -07:00
Phillip Webb 7956e68224 Fix warnings 2016-04-11 11:41:38 -07:00
Venil Noronha 1def64e49e Add Jetty `acceptors` and `selectors` support
Add support for Jetty `acceptors` and `selectors` configuration, either
directly on the `JettyEmbeddedServletContainerFactory` or via
`server.jetty.acceptors`/`server.jetty.selectors` server properties.

Fixes gh-5380
Closes gh-5649
2016-04-11 11:30:55 -07:00
Phillip Webb 2d992c1324 Polish 2016-04-11 09:59:16 -07:00
Stephane Nicoll 99ae6dac53 Customize Couchbase's socket connect timeout
Our Windows build is failing currently because the couchbase server does
not handle a socket connection within a second (the default). This commit
adds a property to customize this option and set it to 10 sec in the
sample.

While investigating this issue, it turns out that while
`CouchbaseConfiguration` is public, it is not really possible to extend
it in user's configuration. This commit fixes this problem and add a test
that demonstrates how it can be used.

Closes gh-5657
2016-04-11 18:23:27 +02:00
Stephane Nicoll c38bb9657d Polish 2016-04-11 16:11:51 +02:00
Anand Shah 4d667970c4 Remove SolrAutoConfiguration @PreDestroy
Remove @PreDestroy from SolrAutoConfiguration since the container will
call the close method anyway.

Fixes gh-5333
Closes gh-5339
2016-04-10 22:23:41 -07:00
Phillip Webb 58417ebca5 Delete accidentally committed file
Remove accidentally committed SizeThreshold class.
2016-04-10 11:19:52 -07:00
Phillip Webb ea44ae6a35 Polish contribution 2016-04-10 10:27:06 -07:00
Venil Noronha 6d2f88ed9b Support max-http-header-size & max-http-post-size
Add `server.max-http-header-size` and `server.max-http-post-size`
properties and deprecate `server.tomcat.max-http-header-size`.

Fixes gh-5637
Closes gh-5641
2016-04-10 10:27:06 -07:00
Stephane Nicoll 3d9ac6ea57 Polish 2016-04-10 18:06:15 +02:00
Phillip Webb 2861c7651d Polish 2016-04-10 07:55:59 -07:00
Phillip Webb 0c0be1e626 Polish contribution 2016-04-10 07:48:31 -07:00
Venil Noronha d0ccea1b26 Support ActiveMQ trusted packages
Ass support for white-listing specific packages or trusting all packages
when using ActiveMQ.

Fixes gh-5631
Closes gh-5644
2016-04-10 07:34:09 -07:00
Phillip Webb ae249f7568 Merge branch '1.3.x' 2016-04-09 23:53:26 -07:00
Phillip Webb d7e56abdf3 Don't apply `null` ServerProperties from customize
Update ServerProperties so that `null` values are not applied when
customizing the EmbeddedServletContainerFactory. Primarily changed to
stop `server.undertow.accesslog.enabled` from being blindly applied.

Fixes gh-5515
2016-04-09 23:32:39 -07:00
Phillip Webb 2364bcc117 Polish 2016-04-08 20:34:28 -07:00
Stephane Nicoll fbe53be6c1 Polish Hibernate 5 support
Closes gh-2763
2016-04-08 14:13:23 +02:00
Stephane Nicoll 4e4ea4b51f Polish 2016-04-08 09:23:30 +02:00
Phillip Webb 6550bb4cf1 Polish 2016-04-07 12:20:10 -07:00
Andy Wilkinson 436da1d5fd Polish contribution 2016-04-07 15:27:07 +01:00
Yogesh Lonkar dc8685a927 Allow embedded Mongo's storage to be configured via the environment
Closes gh-5617
2016-04-07 14:50:51 +01:00
Johnny Lim 3b5ecbd066 Polish
Closes gh-5627
2016-04-07 14:47:18 +01:00
Andy Wilkinson e5a253e689 Improve diagnostics when OnBeanCondition type deduction fails
When @ConditionalOnBean or @ConditionalOnMissingBean are used on a
@Bean method, they will, in the absence of any other configuration,
attempt to deduce the bean's type by examining the method's return
type. This deduction can fail. See gh-4841, gh-4934, and gh-5624
for some examples of possible failure causes. Previously, this
failure was only logged as a debug message leaving the user with a
misleading message suggesting that the @ConditionalOnBean or
@ConditionalOnMissingBean annotation was not configured correctly.

This commit improves the diagnostics by mention the possibility of
type deduction in the exception message and including the exception
that caused deduction to fail as the cause.

Closes gh-4934
2016-04-07 12:26:07 +01:00
Dave Syer 9b121dcbaa Make MustacheViewResolver extend AbstractTemplateViewResolver
The Mustache support should still be usable outside a web application
because the properties only use web stuff in that context and don't
have any field or method signatures that depend on web.

Fixes gh-5626
2016-04-07 10:58:15 +01:00
Phillip Webb 9f1466c9a3 Refine Narayana log directory logic
Refine the log directory logic used by Narayana so that it is consistent
with Atomikos and Bitronix.

See gh-5552
2016-04-06 19:13:38 -07:00
Phillip Webb 48800f1818 Polish contribution 2016-04-06 17:05:01 -07:00
Gytis Trikleris a2adc5a130 Add Narayana JTA support
Add support for JBoss Narayana.

Fixes gh-5552
2016-04-06 17:02:53 -07:00
Phillip Webb 01c9d72644 Polish 2016-04-06 15:19:58 -07:00
Johnny Lim a55315b5b5 Polish
Closes gh-5614
2016-04-06 10:25:45 +02:00
Mohamed Gazal 3623eeda0c Add Liquibase rollback file support
Add a `liquibase.rollback-file` property which can be used to write
a rollback file when migrations occur.

Fixes gh-1826
Closes gh-5535
2016-04-05 18:56:45 -07:00
Phillip Webb 0db1194007 Upgrade to Hibernate 5.1
Upgrade to Hibernate 5.1, whilst still retaining compatibility with
Hibernate 4.3. This commit introduces the following changes:

* Add SpringPhysicalNamingStrategy to provides lowercase/underscore
  table names support. This should be equivalent to the previous
  SpringNamingStrategy that was used with Hibernate 4. No
  ImplicitNamingStrategy is provided since the Hibernate 5 defaults
  appear to be roughly equivalent to the conventions used in Spring
  Boot 1.3
  spring.jpa.hibernate.naming.

* Migrate  `spring.jpa.hibernate.naming-strategy` to
  `spring.jpa.hibernate.naming.strategy` and provide additional
  properties for physical and implicit.

* Add `spring.jpa.hibernate.use-new-id-generator-mappings` property and
  default to `false` when on Hibernate 5 to retain back compatibility.

See gh-2763
2016-04-05 17:54:15 -07:00
Andy Wilkinson d27e280759 Merge branch '1.3.x' 2016-04-05 13:38:41 +01:00
Stephane Nicoll 520448cd9c Add support for publisher confirms/returns
Closes gh-3945
2016-04-05 14:25:18 +02:00
Andy Wilkinson ffe21175ca Upgrade to Logback 1.1.7
Closes gh-5568
2016-04-05 12:40:21 +01:00
Stephane Nicoll 05ef0818f8 Polish contribution
Closes gh-5511
2016-04-05 12:38:04 +02:00
Huang YunKun 6a2ff3f02a Upgrade elasticsearch to 2.2.0
Closes gh-5443
2016-04-05 12:38:04 +02:00
Andy Wilkinson 487f7310fd Polish contribution 2016-04-05 11:03:03 +01:00
Quinten De Swaef 34eb3695e4 Allow Tomcat's minimum threads to be configured via the environment
Closes gh-5572
2016-04-05 10:56:11 +01:00
Phillip Webb b398b3319c Rename @SpringApplicationTest -> @SpringBootTest
Rename @SpringApplicationTest to SpringBootTest and
@SpringApplicationContextLoader to @SpringBootContextLoader.

Fixes gh-5562
2016-04-04 22:36:58 -07:00
Phillip Webb 4d404b214c Migrate away from @SpringApplicationConfiguration
Refactor internal tests to no longer use @SpringApplicationConfiguration

See gh-5562
2016-04-04 22:36:57 -07:00
Phillip Webb adb42ed966 Polish 2016-04-04 22:36:57 -07:00
Andy Wilkinson 15cbef3df0 Update JpaBaseConfiguration to use constructor injection
This change was missed as part of the work done in 19d8c5e6.

See gh-5306
Closes gh-5543
2016-04-04 18:55:31 +01:00
Andy Wilkinson 611d441763 Polishing 2016-04-04 13:25:02 +01:00
Dave Syer 416ce1a6f4 Make FixedAuthoritiesExtractor more liberal in what it accepts
In particular it now accepts a list of maps containing
"authority" keys (which is what you get from a standard JSON
decoding of a Spring Security Authentication).

Fixes gh-5482
2016-04-04 12:20:39 +01:00