Commit Graph

4274 Commits

Author SHA1 Message Date
Marcin Zajączkowski 99f1c7bf55 Fix typo in gradle plugin documentation 2015-03-28 10:23:13 +01:00
Phillip Webb 85319c0793 Fix Java 8 Javadoc errors 2015-03-27 18:59:47 -07:00
Eddú Meléndez 48959f2553 Add support for EhCache
Include auto-configuration support for EhCache with auto-detection of
the default `ehcache.xml` at the root of the classpath. EhCache
configuration can also be set via `spring.cache.config`.

See gh-2633
2015-03-27 15:55:42 -07:00
Stephane Nicoll 151220f41d Add cache manager auto-configuration
Add support for cache manager auto-configuration that is triggered when
the `EnableCaching` annotation is added to a Spring Boot application.

A new "spring.cache" set of configuration keys is also provided. The
"spring.cache.mode" allows the user to specify the cache provider that
should be auto-configured. If no explicit configuration is provided,
the environment is checked for the best suited cache implementation,
that is:

- Generic if at least one `Cache` bean is defined in the context.
- Hazelcast if either a default configuration file is present or the
  `spring.cache.config` property is set.
- JCache if one JSR-107 provider is present
- Redis if a `RedisTemplate` is defined in the context
- Guava
- Simple as a fallback option, using concurrent maps
- NoOp (that is, no cache) if the mode is set to "none"

If the provider supports it, it is possible to specify the caches
to create on startup via `spring.cache.cache-names`. If the provider
relies on a configuration file and a custom one needs to be used
`spring.cache.config` can be set to such custom resource.

If more than one JSR-107 provider is present, it is possible to force
the provider to use by setting the mode to `jcache` and specifying the
fully qualified class name of the CachingProvider to use via
`spring.cache.jcache.provider`.

See gh-2633
2015-03-27 15:55:36 -07:00
Phillip Webb 10da3d390e Polish 2015-03-27 11:30:58 -07:00
Stephane Nicoll 80194bd0e3 Upgrade to maven-archiver 2.6
Closes gh-2376
2015-03-27 17:45:59 +01:00
Stephane Nicoll e21d8042ad Upgrade event listener to GenericApplicationListener
SmartApplicationListener has been superseded by GenericEventListener as
of Spring Framework 4.2. It will be eventually deprecated and removed.

Migrate our event listeners to use the new contract.

Closes gh-2576
2015-03-27 17:13:25 +01:00
Stephane Nicoll f5023fd415 Use testConnection() method
Update MailHealthIndicator to use the new testConnection() method
available as of Spring Framework 4.2

Closes gh-2666
2015-03-27 16:56:39 +01:00
Andy Wilkinson 370e957a54 Merge branch '1.2.x' 2015-03-26 18:59:20 +00:00
Andy Wilkinson 527850ae55 Align default context path expectation with Undertow 1.1.3's behaviour
When configured with a context path of "", Undertow 1.1.3 changes the
context path to be "/". The change [1] was made to fix UNDERTOW-350
[2].

[1] 3db7707b8b
[2] https://issues.jboss.org/browse/UNDERTOW-350

See gh-2732
2015-03-26 18:53:28 +00:00
Andy Wilkinson d7818b441e Merge branch '1.2.x' 2015-03-26 18:03:23 +00:00
Andy Wilkinson 0da24f82e3 Polishing: move tests for mustache.web into the correct package 2015-03-26 18:02:43 +00:00
Andy Wilkinson dd748eda19 Use the configured charset, if any, in MustacheViewResolver
Closes gh-2670
2015-03-26 18:02:37 +00:00
Andy Wilkinson 99fde7ac89 Merge branch '1.2.x'
Conflicts:
	spring-boot-dependencies/pom.xml
2015-03-26 17:19:44 +00:00
Andy Wilkinson 2cf23e08a0 Upgrade to Undertow 1.1.3.Final
Closes gh-2732
2015-03-26 17:18:51 +00:00
Andy Wilkinson 3a22443fbb Upgrade to H2 1.4.186
Closes gh-2730
2015-03-26 17:18:30 +00:00
Andy Wilkinson 17f03641de Upgrade to Dropwizard Metrics 3.1.1
Closes gh-2731
2015-03-26 17:18:05 +00:00
Andy Wilkinson 5963760c9c Merge branch '1.2.x'
Conflicts:
	spring-boot-dependencies/pom.xml
2015-03-26 17:10:47 +00:00
Andy Wilkinson 9285c9fd77 Merge branch '1.1.x' into 1.2.x
Conflicts:
	spring-boot-dependencies/pom.xml
2015-03-26 17:10:04 +00:00
Andy Wilkinson fe837c0cea Upgrade to Reactor 1.1.6.RELEASE
gh-2735
2015-03-26 17:07:19 +00:00
Andy Wilkinson de28ed4aa1 Upgrade to Groovy 2.3.11
Closes gh-2733
2015-03-26 17:04:26 +00:00
Andy Wilkinson adbd340c91 Upgrade to Logback 1.1.3
Closes gh-2729
2015-03-26 17:03:52 +00:00
Andy Wilkinson 887a7cce1e Upgrade to SLF4J 1.7.11
Closes gh-2734
2015-03-26 17:03:23 +00:00
Andy Wilkinson 0c8b2889fb Merge branch '1.2.x' 2015-03-26 16:32:10 +00:00
Andy Wilkinson d428afb45f Merge branch '1.1.x' into 1.2.x
Conflicts:
	spring-boot-dependencies/pom.xml
2015-03-26 16:32:05 +00:00
Andy Wilkinson 936e1c2152 Update to Spring Security 3.2.7.RELEASE
Closes gh-2726
2015-03-26 16:31:13 +00:00
Andy Wilkinson 03c691443e Merge branch '1.2.x' 2015-03-26 16:30:13 +00:00
Andy Wilkinson 644237d170 Merge branch '1.1.x' into 1.2.x 2015-03-26 16:30:04 +00:00
Andy Wilkinson 1307a2401d Upgrade Spring WS in 1.1.x as well
See gh-2718
2015-03-26 16:29:04 +00:00
Andy Wilkinson a6028280d2 Polishing 2015-03-26 16:27:52 +00:00
Andy Wilkinson a67a37840b Merge branch '1.2.x' 2015-03-26 16:26:48 +00:00
Greg Turnquist 599792097c Upgrade Spring WS to 2.2.1.RELEASE
Closes gh-2718
2015-03-26 16:25:23 +00:00
Andy Wilkinson 5742eeb50d Merge branch '1.2.x' 2015-03-26 11:30:37 +00:00
Andy Wilkinson 6d2bb68aba Ensure that ErrorPageFilter handles errors during async dispatch
Previously, the ErrorPageFilter was not invoked for async dispatches.
This meant that an error that was set during an async dispatch would
go undetected and a 200 response with an empty body would be returned.

This commit updates ErrorPageFilter to configure its
OncePerRequestFilter so that async dispatches are filtered and the
correct error handling is performed.

Closes gh-2711
2015-03-26 11:30:22 +00:00
Andy Wilkinson 20a2f21493 Merge branch '1.2.x' 2015-03-26 10:01:01 +00:00
Andy Wilkinson c3a040acb3 Polishing
Remove unwanted System.out.println call
2015-03-26 10:00:35 +00:00
Stephane Nicoll 36ca78f09b Merge branch '1.2.x'
Conflicts:
	spring-boot-dependencies/pom.xml
2015-03-26 10:46:32 +01:00
Stephane Nicoll c9997f7a4d Upgrade to Spring Framework 4.1.6
Closes gh-2702
2015-03-26 10:43:29 +01:00
Phillip Webb 7947bcd682 Merge branch '1.2.x' 2015-03-25 11:08:58 -07:00
Phillip Webb 35bfa16315 Use file based loader with MockServletContext
Update SpringApplicationContextLoader so that the MockServletContext
uses FileSystemResourceLoader. This allows `/src/main/webapp` folder
to be found.

See gh-2654
2015-03-25 11:06:41 -07:00
Andy Wilkinson 95a0be3cb2 Merge branch '1.2.x' 2015-03-25 17:27:35 +00:00
Andy Wilkinson 219317e8c7 Make web security config require spring-security-web on classpath
Previously, SpringBootWebSecurityConfiguration required a web
application and @EnableWebSecurity to be on the classpath.
@EnableWebSecurity is in spring-security-config so this could lead
to the configuration being active when spring-security-web isn't
on the classpath but the rest of Spring Security is.

This commit updates SpringBootWebSecurityConfiguration to also make it
conditional on a class in spring-security-web.

Fixes gh-2717
2015-03-25 17:22:30 +00:00
Andy Wilkinson 16d61f849c Merge branch 'spring-framework-4.2' 2015-03-25 10:48:17 +00:00
Andy Wilkinson bc99ad2120 Ignore Batch tests that use JDBC as they don’t work with Spring 4.2
Spring Framework’s ParamterizedRowMapper has been deprecated since
3.1 and has been removed in 4.2. Spring Batch currently relies on
ParameterizedRowMapper, making it incompatible with 4.2. To allow us to
build successfully against 4.2, this commit ignores Spring Boot’s tests
that use Spring Batch’s JDBC support.

See gh-2575
2015-03-25 10:48:00 +00:00
Andy Wilkinson 7a73c5883f Avoid using @Order on @Configuration classes as Spring now honours it
In Spring Framework 4.1, @Order on a @Configuration class had no effect.
This allowed us to use it on auto-configuration classes to control
the ordering of auto-configuration classes without it having any
broader implications for configuration class ordering.

Spring Framework 4.2 now honours @Order on @Configuration classes. This
breaks a number of tests where we were relying on the order that the
classes were passed to register when evaluating various bean conditions.

This commit replaces the use of @Order on auto-configuration classes
with a new annotation, @AutoConfigureOrder. The new annotation is
handled by AutoConfigurationSorter where it’s used to order
auto-configuration classes. This allows us to order auto-configuration
classes without the unwanted side-effect of this also affecting the
general ordering of configuration classes.

See gh-2575
2015-03-25 10:47:44 +00:00
Andy Wilkinson 04c5fc8856 Start building against Spring Framework 4.2.0 snapshots
See gh-2575
2015-03-25 10:47:13 +00:00
Phillip Webb ca4e85cb91 Merge branch '1.2.x' 2015-03-24 20:34:03 -07:00
Phillip Webb 60c1a150b3 Polish 2015-03-24 20:33:40 -07:00
Phillip Webb 83ee25e543 Merge branch '1.2.x' 2015-03-24 20:17:52 -07:00
Phillip Webb bd2735ad66 Add alwaysMapUrl flag to ServletRegistrationBean
Add an additional constructor to ServletRegistrationBean that indicates
if a URL mapping is always required. If set to false, the registration
will not longer use the default '/*' mapping.

Fixes gh-2596
2015-03-24 20:14:35 -07:00