Commit Graph

2317 Commits (a90bad37bd876258aa5b6e7a7ac2b1b6d6cce62a)

Author SHA1 Message Date
Phillip Webb b87e02dde0 Polish Spring Integration metrics support
See gh-7722
8 years ago
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
8 years ago
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
8 years ago
Johnny Lim e12b4a944f Polish 8 years ago
Phillip Webb ae389d27a6 Polish 8 years ago
Phillip Webb 8b47561f7e Merge branch '1.5.x' 8 years ago
Phillip Webb 8f7efbe12a Polish `spring.redis.url` support
See gh-7395
8 years ago
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
8 years ago
Phillip Webb 38f7389eab Polish loggers 8 years ago
Phillip Webb 1f7b3cad45 Polish Kafka properties
Closes gh-7672
8 years ago
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
8 years ago
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
8 years ago
Kazuki Shimizu 80eee6b30f Support spring transaction manager properties
Add Spring TransactionManager properties to allow timeout and rollback
settings to be configured.

See gh-7561
8 years ago
Phillip Webb 3f4c32fcdd Polish 8 years ago
Dave Syer 5fa507a477 Merge remote-tracking branch 'origin/1.5.x' 8 years ago
Dave Syer 6ccd858fc0 Fix checkstyle violations 8 years ago
Dave Syer 0b6778754c Merge remote-tracking branch 'origin/1.5.x' 8 years ago
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).
8 years ago
Stephane Nicoll 998ff2feee Merge branch '1.5.x' 8 years ago
Stephane Nicoll 851ce2286f Allow to override Couchbase's CustomConversions
Closes gh-7700
8 years ago
Phillip Webb e248b67751 Polish formatting 8 years ago
Phillip Webb 1f417997f3 Merge branch '1.5.x' 8 years ago
Phillip Webb 6121208cbb Polish formatting 8 years ago
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb bd74c3d327 Polish formatting 8 years ago
Stephane Nicoll 0e8ccbc1d9 Merge branch '1.5.x' 8 years ago
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
8 years ago
Andy Wilkinson a349e2f5ae Merge branch '1.5.x' 8 years ago
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
8 years ago
Andy Wilkinson 943262bb97 Raise the minimum supported version of Hibernate to 5.2.x
Closes gh-7586
8 years ago
Stephane Nicoll 9056e9bd7e Merge branch '1.5.x' 8 years ago
Stephane Nicoll d8d5950e99 Enable validation in `AutoConfigureWebMvc`
Closes gh-7582
8 years ago
Andy Wilkinson cea00f22b1 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 149f19cd58 Register any EventListener beans with auto-configured SessionFactory
Closes gh-7531
8 years ago
Stephane Nicoll b80ad2a212 Harmonize Caffeine CacheManager bean name
Closes gh-6980
8 years ago
Madhura Bhave 1cd1054514 Merge branch '1.5.x' 8 years ago
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
8 years ago
Phillip Webb 263d444d4e Merge branch '1.5.x' 8 years ago
Phillip Webb f6b0652369 Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Phillip Webb e430583eaf Polish 8 years ago
Andy Wilkinson d0b1cad00f Merge branch '1.5.x' 8 years ago
Andy Wilkinson 967625db1e Replace field injection with constructor injection in config classes
Closes gh-7563
8 years ago
Andy Wilkinson 73ba04f878 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 5ac75c949c Increate timeout in Kafka tests as Windows CI agents are very slow 8 years ago
Andy Wilkinson 598eca7e0f Merge branch '1.5.x' 8 years ago
Andy Wilkinson 1464425d64 Remove use of @Component from classes that are not scanned
Closes gh-7549
8 years ago
Andy Wilkinson 665d82ab9b Merge branch '1.5.x' 8 years ago
Andy Wilkinson b60150b05e Make Tomcat Access Log's buffering configurable via the environment
Closes gh-7456
8 years ago
Stephane Nicoll 816c236e5b Merge branch '1.5.x' 8 years ago
Stephane Nicoll ee72e788ed Rename `spring-boot-junit-runners` to `spring-boot-test-support`
Closes gh-7421
8 years ago
Andy Wilkinson b4695a2e80 Merge branch '1.5.x' 8 years ago
Andy Wilkinson fdccd8aaa7 Remove use of field injection from ErrorMvcAutoConfiguration 8 years ago
Stephane Nicoll bd2415463c Merge branch '1.5.x' 8 years ago
Stephane Nicoll cb9e021fa9 Polish 8 years ago
Stephane Nicoll a4770f90dc Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll 056819b2aa Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll 0e7f9dae45 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 2f48c50e84 Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Stephane Nicoll 2dbebf67e8 Merge branch '1.5.x' 8 years ago
Johnny Lim c654eff41b Update doc for spring.data.neo4j.open-in-view
See gh-7533
8 years ago
Stephane Nicoll 0568afc6cb Merge branch '1.5.x' 8 years ago
Johnny Lim 423f8037ce Polish
Closes gh-7530
8 years ago
Stephane Nicoll e7275b62dc Merge branch '1.5.x' 8 years ago
Oscar Utbult fabe35fdc4 Remove redundant toString() invocation
Closes gh-7527
8 years ago
Phillip Webb fe63c981f8 Merge branch '1.5.x' 8 years ago
Phillip Webb dada7423b0 Polish 8 years ago
Phillip Webb b4c3f4f504 Merge branch '1.5.x' 8 years ago
Phillip Webb ec73144240 Fix warnings 8 years ago
Phillip Webb 5ed00b3501 Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb 9fdb563d5a Polish 8 years ago
Phillip Webb 357d072a60 Polish 8 years ago
Andy Wilkinson 4870349438 Merge branch '1.5.x' 8 years ago
Andy Wilkinson 2be554456e Introduce SearchStrategy.ANCESTORS as a replacement for .PARENTS
Closes gh-6763
8 years ago
Stephane Nicoll a2803f4139 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll e354576c09 Merge branch '1.5.x' 8 years ago
Johnny Lim cabb564804 Add ValidationAutoConfiguration to spring.factories
Closes gh-7494
8 years ago
Stephane Nicoll e81f7d5811 Remove deprecated code
See gh-7362
8 years ago
Stephane Nicoll f260cd9a07 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll 3bfbbeb9f4 Merge branch '1.5.x' 8 years ago
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
8 years ago
Stephane Nicoll fd62707cbb Merge branch '1.5.x' 8 years ago
Stephane Nicoll 7e25c0dcdd Fix build 8 years ago
Stephane Nicoll c62f340c34 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 57605b6749 Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Stephane Nicoll 662b05b90c Merge branch '1.5.x' 8 years ago
Stephane Nicoll 64a50b60ab Merge branch '1.4.x' into 1.5.x 8 years ago
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
8 years ago
Stephane Nicoll 94542cee1f Merge branch '1.5.x' 8 years ago
Stephane Nicoll 64e0899456 Polish customize Cassandra's Cluster
Closes gh-7320
8 years ago
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
8 years ago
Stephane Nicoll 2f57e1885a Merge branch '1.5.x' 8 years ago
Stephane Nicoll ea023618a4 Polish upgrade to Spring Session 1.3.0.RC1
Closes gh-7457
8 years ago
Vedran Pavic ffec6fddd2 Upgrade Spring Session to 1.3.0.RC1
See gh-7457
8 years ago