Commit Graph

2334 Commits

Author SHA1 Message Date
n27
e41d42171b Improve ActiveMQ connection pool configuration
Closes gh-1598
2016-03-18 09:26:24 +01:00
Stephane Nicoll
fa84b179a8 Allow to customize the Couchbase environment
Closes gh-5403
2016-03-18 09:08:41 +01:00
Stephane Nicoll
caf11e4445 Add Couchbase cache support
This commit updates the cache auto-configuration to provide a
`CouchbaseCacheManager` if a `Bucket` has been configured.

The global customizer infrastructure allows to further tune the cache
manager if necessary.

Closes gh-5176
2016-03-18 07:52:56 +01:00
Stephane Nicoll
9c733128ac Use ConditionalOnSingleCandidate when appropriate
This commit updates various auto-configuration to use
`@ConditionalOnSingleCandidate` rather than assuming that at most one
bean of a given type will be available.

Closes gh-2784
2016-03-17 15:15:59 +01:00
Stephane Nicoll
25f00b9bb8 Polish contribution
Closes gh-5341
2016-03-17 13:25:35 +01:00
Gary Russell
08732fe4c8 Add Retry Config: Template and Listener
Also add requeue rejected to listener config and
timeouts to RabbitTemplate config.

Closes gh-5340
2016-03-17 13:01:33 +01:00
Stephane Nicoll
2526a54e31 Polish contribution
Closes gh-5337
2016-03-14 14:24:24 +01:00
Anand Shah
f6a32a1d5a Add @LocalServerPort
Closes gh-5262
2016-03-14 14:24:24 +01:00
Stephane Nicoll
e67f2e2983 Separate Couchbase setup from Spring Data
This commit separates the basic setup of Couchbase from Spring Data so
that a `Bucket` and `Cluster` bucket beans are exposed even if Spring
Data is not available.

A basic setup happens if `spring.couchbase.bootstrap-hosts` is specified,
configuring the `default` bucket with no authentication unless specified
otherwise.

If Spring Data is available, those beans are re-used by default to
configure the `CouchbaseTemplate` and other repository-related beans.

Closes gh-5347
2016-03-14 11:11:48 +01:00
Stephane Nicoll
dddea70985 Collect and display build information
This commit updates the Maven plugin to generate a
`META-INF/boot/build.properties` file with various build-specific
settings (group, artifact, name, version and build time). Additionally,
the plugin can be configured to write an arbitrary number of additional
properties.

A new `BuildProperties` bean is automatically exposed when such a file is
present. If that bean is present, an `InfoContributor` is automatically
created to expose that information under the `build` key.

As for the git contributor, it is possible to only display the core
settings or everything using the `management.info.build.mode` property.

See gh-2559
2016-03-10 17:21:31 +01:00
Stephane Nicoll
3e6b584953 Add Date as a support property type
Rather than exposing a raw String with the epoch time, GitProperties
now exposes the actual `java.util.Date`. `InfoProperties` has been
improved to return such data type when the raw value is an epoch time.
2016-03-10 14:42:48 +01:00
Stephane Nicoll
b906b18655 Initiate GitProperties
This commit polish the new info contributor infrastructure by migrating
`GitInfo` to `GitProperties`. `InfoProperties` provides an abstraction
that exposes unstructured data in an immutable way.

The `GitInfoContributor` now accepts a "mode" that determines if all data
should be exposed or only a sub-set of known keys.

Closes gh-2644
2016-03-09 16:37:44 +01:00
Phillip Webb
b260c20df0 Support JsonSerializer/JsonDeserializer Beans
Add a `@JsonComponent` annotation that can be used to indicate that a
Bean is a JsonSerializer and/or JsonDeserializer that should be
registered with Jackson.

Support is provide via a new `JsonComponentModule` which is
auto-configured in `JacksonAutoConfiguration`.

Also add `JsonObjectSerializer` and `JsonObjectDeserializer` classes
which provided as a convenient base for serializers that work with
Objects.

Fixes gh-3898
2016-03-08 17:33:00 -08:00
Phillip Webb
a3f3de223f Polish 2016-03-08 11:20:41 -08:00
Stephane Nicoll
9bbde5b340 Properly guard validation support
Prevent the validation support to kick in if the Validation API is not
available.

Closes gh-5353
2016-03-08 08:57:47 +01:00
Andy Wilkinson
86d87f6b8a Deprecate support for Velocity
Support for Velocity has been deprecated in Spring Framework 4.3 with
the plan being to remove it in 5.0. This commit deprecates Spring
Boot's support in 1.4, with the plan being to remove it in 2.0.

Closes gh-5276
2016-03-07 13:48:17 +00:00
Stephane Nicoll
ad53f09ed4 Improve Couchbase repository support
Previously, if Couchbase was available on the classpath but not
configured, Spring Boot would attempt to scan the project for
repositories anyway.

This commit makes sure that it only happens if an infrastructure
bean required is present. The tests have also been rewritten to better
reflect what would happen in practice.

Closes gh-5349
2016-03-07 13:19:22 +01:00
Stephane Nicoll
d6bc3f0bc6 Fix build
Assert using epoch time
2016-03-04 17:43:15 +01:00
Stephane Nicoll
76edaa7e1e Fix build
Add TimeZone in date assertion
2016-03-04 17:30:00 +01:00
Stephane Nicoll
f11fa0c309 Use java.util.Date rather than a raw String
This commit updates `GitInfo` to use a proper `java.util.Date` rather
than a raw String. Because the Maven and Gradle plugin do not agree on a
format, `ProjectInfoAutoConfiguration` now registers a `Converter` that
is taking care of translating the raw `String` to a `Date`.

See gh-2484
2016-03-04 17:14:34 +01:00
Andy Wilkinson
5009933788 Move to constructor injection in simple configuration classes
This commit updates "simple" configuration classes to use constructor
injection. Simple means that there are no optional dependencies
(@Autowired(required=false) is not used), and none of the dependencies
use generics.

Configuration classes that are not simple will be updated in a second
pass once https://jira.spring.io/browse/SPR-14015 has been fixed.

See gh-5306
2016-03-04 12:27:29 +00:00
Stephane Nicoll
398aed7fdb Missing entry for ProjectInfoAutoConfiguration 2016-03-04 13:26:15 +01:00
Phillip Webb
73cbb2f40a Polish 2016-03-03 09:14:24 -08:00
Stephane Nicoll
d04155fcae Polish contribution
Closes gh-5303
2016-03-03 18:09:05 +01:00
Gary Russell
c0cb813a01 Add Cache Properties for RabbitMQ
Closes gh-3502
2016-03-03 16:46:08 +01:00
Stephane Nicoll
0f820afa86 Auto-configure GitInfo
This commit moves `GitInfo` to a general "project info" area that will be
further improved with others project related information.

Deprecate `spring.git.properties` in favour of `spring.info.git.location`

Closes gh-2484
2016-03-03 14:31:00 +01:00
Johnny Lim
a6c83787ef Polish
Closes gh-5318
2016-03-03 08:33:21 +01:00
Andy Wilkinson
ef5087c5ee Upgrade to Jackson 2.7.2
Closes gh-5081
2016-03-02 07:25:55 +00:00
Andy Wilkinson
355860fd09 Remove @Autowired from constructors where class has single constructor
Closes gh-5226
2016-03-01 16:03:07 +00:00
Stephane Nicoll
813d86e5e0 Auto-configure Rabbit MessageConverter
If a `MessageConverter` bean is available, we now associate it to the
created `RabbitTemplate` and `RabbitListenerContainerFactory`. That way,
registering a custom `MessageConverter` is all that's needed.

The Rabbit auto-configuration is now using the new `ObjectProvider` that
offers a nicer API to detect if a primary candidate is available for
optional collaborators.

Closes gh-5088
2016-02-29 19:32:30 +01:00
Stephane Nicoll
360caf3d97 Polish 2016-02-29 19:24:18 +01:00
Stephane Nicoll
bfa9ae13e7 Polish 2016-02-29 17:59:02 +01:00
Stephane Nicoll
d13b9a98c5 Auto-configure JMS MessageConverter
If a `MessageConverter` bean is available, we now associate it to the
created `JmsTemplate` and `JmsListenerContainerFactory`. That way,
registering a custom `MessageConverter` is all that's needed.

The JMS auto-configuration is now using the new `ObjectProvider` that
offers a nicer API to detect if a primary candidate is available for
optional collaborators.

Closes gh-4282
2016-02-29 17:33:34 +01:00
Stephane Nicoll
d9f4d6ce91 Allow custom CacheResolver
Previously, if a bean of type `CacheResolver` was present in the context
the whole cache auto-configuration would back off. If said
`CacheResolver` hasn't been defined via the `CachingConfigurer`
infrastructure, the application context would fail with a rather
unpleasant error message.

It can be quite common to define custom `CacheResolver` beans as the cache
annotations allow to defines custom cache resolvers per operation. This
commit makes sure that the cache auto-configuration will back-off only if
the `CacheResolver` is named `cacheResolver`.

Closes gh-5201
2016-02-29 15:48:46 +01:00
Stephane Nicoll
6741f05af1 Polish contribution
Closes gh-4903
2016-02-29 14:07:01 +01:00
Eddú Meléndez
98cc68364a Add Caffeine cache support
See gh-4899
2016-02-29 14:07:01 +01:00
Stephane Nicoll
ebf82e4c20 Fix hazelcast schema location
Closes gh-5237
2016-02-26 09:11:37 +01:00
Phillip Webb
023a09bcf6 Merge branch '1.3.x' 2016-02-25 22:13:32 -08:00
Phillip Webb
936a96746a Fix missing Javadoc @param 2016-02-25 22:13:03 -08:00
Phillip Webb
17c9fc585f Polish 2016-02-25 21:32:09 -08:00
Phillip Webb
c93ea54ea3 Merge branch '1.3.x' 2016-02-25 21:26:13 -08:00
Phillip Webb
4fd778fed8 Polish CacheManagerCustomizers 2016-02-25 20:05:16 -08:00
Andy Wilkinson
fcb5f03146 Upgrade to Hazelcast 3.6
Closes gh-5237
2016-02-25 20:15:02 +00:00
Stephane Nicoll
78f19ef852 Polish 2016-02-25 15:15:16 +01:00
Stephane Nicoll
7457596b15 Merge branch '1.3.x' 2016-02-25 14:27:59 +01:00
Stephane Nicoll
ad57d99fe5 Cleanup HazelcastInstance in test
If a JCache provider is started with hazelcast and the default settings,
the underlying `HazelcastInstance` is disposed at the end of the
process, not when the `CacheManager` is closed.

This commit fixes the only test that use such setup.

See also https://github.com/hazelcast/hazelcast/issues/7606

Closes gh-5209
2016-02-25 14:25:28 +01:00
Stephane Nicoll
416b689359 Enable prefix by default on RedisCacheManager
An overhaul of the `RedisCacheManager` is expected in Hopper (to be
consumed by Spring Boot 1.4). One of those changes is to make sure every
key have a decent prefix by default.

This commit enables the use of prefix as it is disabled by default.

Closes gh-5175
2016-02-25 13:51:59 +01:00
Andy Wilkinson
44ddfcc7fa Upgrade copyright headers of all files changed in 2016 2016-02-25 12:09:42 +00:00
Andy Wilkinson
b6c509bd75 Merge branch '1.3.x' 2016-02-25 10:51:58 +00:00
Andy Wilkinson
6075682e64 Polishing
- Code formatting
 - Javadoc warnings
 - Deprecation warnings
2016-02-24 17:05:54 +00:00