Commit Graph

2204 Commits

Author SHA1 Message Date
Stephane Nicoll fe89af5e82 Polish contribution
Closes gh-7796
2017-01-03 11:33:57 +01:00
Eddú Meléndez 24c83d12da Autodetect spring.jpa.database from spring.datasource.url
Previously, property `spring.jpa.database` should be provided. This
commit allows to detect the database when `spring.datasource.url` is
provided.

Closes gh-7708
2017-01-03 11:24:58 +01:00
Phillip Webb b27f4e23be Ignore @ImportAutoConfiguration exclude errors
Update `ImportAutoConfigurationImportSelector` to ignore excludes for
classes that aren't loaded. Since the import classes for tests tend to
be much more limited, the exception isn't really helpful.

Closes gh-6809
2016-12-30 12:53:59 -08:00
Phillip Webb aacf5d660f Update copyright year for changed files 2016-12-30 11:53:51 -08:00
Phillip Webb 273beaa3ce Polish 2016-12-30 11:10:44 -08:00
Phillip Webb f8acaae115 Merge branch '1.4.x' into 1.5.x 2016-12-30 11:00:06 -08:00
Phillip Webb 9ccf47398e Formatting 2016-12-30 10:56:44 -08: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 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 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 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 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 4b641ca211 Polish
Closes gh-7561
2016-12-29 10:07:23 +01: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 8b69856fc9 Polish 2016-12-28 15:23:26 -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 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 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 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 62bff1017e Validate that AopAutoConfiguration back off properly
Closes gh-7694
2016-12-22 14:48:54 +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 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 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 6ccd858fc0 Fix checkstyle violations 2016-12-20 12:59:51 +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 851ce2286f Allow to override Couchbase's CustomConversions
Closes gh-7700
2016-12-20 11:59:16 +01:00