Commit Graph

2080 Commits

Author SHA1 Message Date
Phillip Webb
758ddcd420 Polish 2017-04-11 20:17:23 -07:00
Stephane Nicoll
0a55e3e736 Polish "Clarify edge case docs on ConditionalOnClass"
Closes gh-8185
2017-04-10 16:12:11 +02:00
Phillip Verheyden
08f8219248 Clarify edge case docs on ConditionalOnClass
When used as a meta-annotation the value() attribute of
@ConditionalOnClass will fail silently resulting in the @Conditional
nature of the annotation being ignored.

See gh-8185
2017-04-10 15:58:17 +02:00
Andy Wilkinson
6564fb3d96 Consider all loader paths when checking template availability
Closes gh-8842
2017-04-10 13:37:32 +01:00
Dr. Stefan Hüttemann
0294ad3e95 Allow to disable max http post size limit
Closes gh-8508
2017-04-10 10:54:20 +02:00
Andy Wilkinson
5dad7182db Address deprecation warnings 2017-04-07 12:01:01 +01:00
Phillip Webb
ddcb5ee328 Polish 2017-04-04 09:36:27 -07:00
Andy Wilkinson
b280e3092d Don't forward to welcome page that won't exist due to custom mapping
Previously, WelcomePageHandlerMapping would forward to index.html.
This assumed that the static path pattern was always /**. If it had
been customised to, for example, /foo/**, then the forward would still
be to index.html and a 404 would result as the page is actually
available at /foo/index.html.

At first glance, it would appear that the forward should be made to
foo/index.html. However, as it's a forward rather than a redirect,
any relative URLs in the index.html page would then be resolved using
/ whereas they should be resolved using /foo/. This could be addressed
by using a redirect rather than a forward, but we don't want to do
that as it's more invasive and would require a roundtrip back to the
client. Instead, this commit simply stops performing the forward when
the static path pattern is not /**.

Closes gh-8788
2017-04-04 10:13:24 +01:00
Stephane Nicoll
cd76da9a4c Avoid using immutable collections for configuration proprerties
Closes gh-8620
2017-03-16 12:39:48 +01:00
Vedran Pavic
17aad4f00c Improve RedisSessionConfiguration conditions
Closes gh-8582
2017-03-15 15:09:31 +01:00
Eddú Meléndez
251090b1e5 Add missing spring-data-cassandra metadata
This commit adds the missing
`spring.data.cassandra.repositories.enabled` in the metadata and the
documentation.

Closes gh-8562
2017-03-10 09:34:19 +01:00
Stephane Nicoll
e7922a574a Polish 2017-03-09 18:33:13 +01:00
Stephane Nicoll
07c56c60ba Make sure Hazelcast bootstraps before any JCache setup
This commit makes sure that if a `javax.cache.CacheManager` is required,
an auto-configured `HazelcastInstance` is fully resolved first. This
prevents the case where the JCache bootstrap actually starts an instance
early, followed by a second (potentially unwanted) instance created by the
regular auto-configuration.

Since the JCache implementation works with an `HazelcastInstance` behind
the scenes, if there is one `HazelcastInstance` configured and it has a
name, then we configure the `CacheProvider` to use that. Future Hazelcast
version will allow to pass the instance directly (i.e. not requiring an
actual name).

Closes gh-8484
2017-03-09 17:59:20 +01:00
Phillip Webb
f5aeac3658 Polish 2017-03-06 11:43:29 -08:00
Stephane Nicoll
9fb9a67c4b Avoid early initializations
This commit flags the two `BeanPostProcessors` registered by the
embedded support as `synthetic` so that they don't trigger an early
initialization of other components.

Closes gh-8467
2017-03-06 08:16:58 +01:00
Spring Buildmaster
2a83e80a9b Next Development Version 2017-03-03 14:39:21 +00:00
Phillip Webb
987b6c956e Polish 2017-03-01 20:43:04 -08:00
Phillip Webb
57111aba22 Get published DataSource from EntityManager
Update DataSourceInitializedPublisher to always attempt to obtain the
published DataSource directly from the EntityManager. In the case where
the EntityManager doesn't provide a DataSource, the previous logic is
used.

Fixes gh-8296
2017-03-01 20:42:26 -08:00
Andy Wilkinson
59d3a79c82 Avoid eager initialization when finding beans by annotation
Closes gh-8269
2017-03-01 15:05:54 +00:00
Andy Wilkinson
8a326a8713 Simplify BeanTypeRegistry by requiring a DefaultListableBeanFactory
Closes gh-8439
2017-03-01 14:36:26 +00:00
Phillip Webb
47b00c086c Polish 2017-02-27 13:56:17 -08:00
Andy Wilkinson
9e1238e286 Consider resource loader path when checking Groovy template availability
Closes gh-8304
2017-02-15 17:24:57 +00:00
Andy Wilkinson
06017f688a Only auto-configure SpringSocialDialect for Thymeleaf 2
Previously, SocialWebAutoConfiguration would create a
SpringSocialDialect bean when SpringTemplateEngine was on the
classpath. This class exists in both Thymeleaf 2 and Thymeleaf 3 but
SpringSocialDialect is only compatible with Thymeleaf 2.

This commit updates the auto-configuration to require
SpringResourceResourceResolver to be on the classpath. This class
exists in Thymeleaf 2 but does not exist in Thymeleaf 3.

Closes gh-4858
2017-02-07 16:20:33 +00:00
Stephane Nicoll
008aef6142 Document @LiquibaseDataSource feature
Closes gh-8214
2017-02-07 16:16:19 +01:00
Spring Buildmaster
ed1ce140c0 Next Development Version 2017-01-26 14:20:39 +00:00
Andy Wilkinson
d2201d5284 Correct copyright dates and enforce that starting year is 2012
Closes gh-7923
2017-01-13 18:43:30 -05:00
Andy Wilkinson
6f7d1de167 Remove redundant logic from OAuth2MethodSecurityConfiguration
Previously, OAuth2MethodSecurityConfiguration set the
PermissionEvaluator on the expression evaluator by looking in the
context for a PermissionEvaluator bean. This is unnecessary as
GlobalMethodSecurityConfiguration already does the same thing and does
so after the post-processor in OAuth2MethodSecurityConfiguration has
run. This commit removes the redundant logic and adds tests to check
that both the PermissionEvaluator and the RoleHierarchy are set use
beans in the context.

Closes gh-7979
2017-01-13 07:28:57 -05:00
Phillip Webb
9ccf47398e Formatting 2016-12-30 10:56:44 -08:00
Stephane Nicoll
7b494cf319 Polish
See gh-7793
2016-12-30 15:59:17 +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
Stephane Nicoll
1f5970c537 Fix auto-configuration class reference
Closes gh-7781
2016-12-29 10:49:19 +01:00
Spring Buildmaster
9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Phillip Webb
bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Stephane Nicoll
b80ad2a212 Harmonize Caffeine CacheManager bean name
Closes gh-6980
2016-12-12 11:40:39 +01: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
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
Phillip Webb
357d072a60 Polish 2016-11-28 15:14:46 -08: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
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
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
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
249ed899a6 Fix use of KB and MB in Multipart documentation
Closes gh-7364
2016-11-20 15:51:47 +09:00
Phillip Webb
fce17ca6d9 Polish 2016-11-18 15:50:19 -08: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
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
Vedran Pavic
5783cd5593 Fix JWT token URI derivation
Closes gh-7299
2016-11-06 11:24:50 +01:00
Phillip Webb
90afc8ebbe Formatting 2016-11-03 14:48:10 -07:00