Commit Graph

3934 Commits

Author SHA1 Message Date
Andy Wilkinson 78432fc745 Disable javadoc linting when building with JDK 8+
Java 8 introduced new, aggressive linting of javadoc that’s enabled by
default. The linter isn’t sufficiently configurable to allow us to tune
it to meet the project’s conventions for javadoc so our only realistic
option is to disable linting.

This commit introduces a new profile to disable javadoc linting. To
maintain compatibility with JDK 7, the profile is only active when the
build’s running on JDK 8 or later.

Closes gh-2233
2015-01-19 11:32:03 +00:00
Stephane Nicoll dc501dfd2b Merge pull request #2370 from bclozel/acceptcharset
* acceptcharset:
  Disable Accept-Charset Header in String converter
2015-01-16 17:54:56 +01:00
Brian Clozel 6d60c23460 Disable Accept-Charset Header in String converter
This commit prevents the `Accept-Charset` from being written by the
StringHttpMessageConverter. This feature is enabled by default in the
framework and writes a *quite long* response header with all charsets
supported by the server.

Closes gh-2370, see gh-1800
2015-01-16 17:39:56 +01:00
Andy Wilkinson ff2d423fcb Correct the root context path used with Undertow
Undertow, like Tomcat, uses "" for the context path of the root
context. Previously, the Undertow deployment was being configured with
"/" for the root context. This was leading to a silent failure in
AsyncContextImpl.dispatch when it failed to look up the deployment
manager for the current request.

This commit updates UndertowEmbeddedServletContainerFactory to use the
correct context path (an empty String) for the root context.

Fixes gh-2365
2015-01-16 13:38:13 +00:00
Andy Wilkinson f019fb217d Merge branch 'gh-2031' 2015-01-16 12:07:35 +00:00
Andy Wilkinson e2f2839d32 Document Tomcat compression and GzipFilter auto-configuration
Closes gh-2031
2015-01-16 12:07:29 +00:00
Andy Wilkinson 69ea4beb8a Add auto-configuration for Jetty’s GzipFilter
Jetty’s GzipFilter is a container-agnostic Filter that can be used to
provide gzip and deflate encoding of HTTP responses. This commit adds
auto-configuration for GzipFilter that is enabled when
org.eclipse.jetty:jetty-servlets is on the classpath. The filter can
be configured using spring.http.gzip.*

See gh-2031
2015-01-16 12:07:28 +00:00
Andy Wilkinson ec17c00126 Add support for configuring Tomcat’s gzip support using the environment
Tomcat provide built-it support for gzip compression of HTTP responses.
This commit adds support for enabling and configuring this compression
via the environment using server.tomcat.compression and
server.tomcat.compressableMimeTypes.

See gh-2031
2015-01-16 12:07:28 +00:00
Dave Syer 704054a861 Merge branch '1.1.x' 2015-01-16 11:30:04 +00:00
Dave Syer b3597107ba More careful masking for the HTTP status in non-error cases
The ErrorPageFilter exposes a wrapped response to the downstream
chain and unless more care is taken the chain will be able to
set the response status, but not inspect it.

Fixes gh-2367
2015-01-16 11:29:00 +00:00
Andy Wilkinson 11c47d8a05 Merge branch '1.1.x' 2015-01-15 09:52:45 +00:00
Andy Wilkinson a51ad5c684 Update Eclipse template copyright date to 2015 2015-01-15 09:52:10 +00:00
Andy Wilkinson 492cf4ef54 Add jersey-bean-validation to spring-boot-starter-jersey
A dependency on org.glassfish.jersey.ext:jersey-bean-validation has
been added to spring-boot-starter-jersey. jersey-bean-validation’s EL
dependencies have been excluded in favour of those provided by
spring-boot-starter-tomcat (or starter-jetty or starter-undertow should
the user choose to use a different embedded container).

Closes gh-2315
2015-01-15 09:50:05 +00:00
Andy Wilkinson 16cb44f890 Merge branch '1.1.x' 2015-01-14 16:55:45 +00:00
Andy Wilkinson 376de01636 Don't remove @GrabResolver in JarCommand, disable initClass instead
Previously, JarCommand removed all @GrabResolver annotations in an
AST transformation. This was being performed as custom resolver
configuration is not necessary in a jar as all of the dependencies are
available from the jar. Furthermore, leaving the annotations in place
caused a failure when the jar was run due to a missing Ivy dependency
that's required by Groovy's default GrapeEngine, GrapeIvy.

The removal of @GrabResolver annotations was being done before they
could be used by Groovy's GrabAnnotationTransformation to configure
the GrapeEngine's resolvers. This resulted in the annotations having
no effect such that a dependency that was only available from a
repository made available by @GrabResolver would fail to resolve if
it was not cached locally.

This commit updates the AST transformation to leave the @GrabResolver
annotations in place but to set their initClass attribute to false.
This allows the annotation to be used while the jar's being compiled,
but supresses the generation of the static initializer that adds the
custom resolver to the GrapeEngine when the compiled code's run via
java -jar.

Fixes gh-2330
2015-01-14 16:42:43 +00:00
Andy Wilkinson 0074e9de9d Merge branch '1.1.x' 2015-01-14 15:08:33 +00:00
Andy Wilkinson 9744d28299 Uninstall SLF4J’s Java logging bridge handler during shutdown
Previously, when LogbackLoggingSystem or Log4JLoggingSystem were
initialized during application start up, they would install SLF4J’s Java
logging bridge handler, however no corresponding uninstall was performed
during application shutdown. When deployed to a servlet container, where
the application’s lifecycle doesn’t match the JVM’s lifecycle, this lead
to a memory leak.

This commit updates LoggingSystem to introduce a new cleanUp method. An
empty implementation is provided to preserve backwards compatibility
with existing LoggingSystem subclasses. Both LogbackLoggingSystem and
Log4JLoggingSystem have been updated to implement cleanUp and uninstall
the SLF4J bridge handler. LoggingApplicationListener has been updated
to call LoggingSystem.cleanUp in response to a ContextClosedEvent.

Closes gh-2324
2015-01-14 14:37:58 +00:00
Andy Wilkinson c0ef7d1815 Upgrade to Spring AMQP 1.4.2.RELEASE 2015-01-14 13:34:20 +00:00
Andy Wilkinson b97fc63234 Upgrade to Spring Integration 4.1.2.RELEASE
Closes gh-2352
2015-01-14 13:34:06 +00:00
Andy Wilkinson dcc07ad6c9 Upgrade to Mockito 1.10.19
Closes gh-2337
2015-01-14 13:33:47 +00:00
Andy Wilkinson 1ab510e53c Upgrade to H2 1.4.184
Closes gh-2334
2015-01-14 13:33:22 +00:00
Andy Wilkinson bb058934a6 Upgrade to Gson 2.3.1
Closes gh-2333
2015-01-14 13:32:40 +00:00
Andy Wilkinson de2087ff2e Merge branch '1.1.x' 2015-01-14 12:29:06 +00:00
Andy Wilkinson 92c8b75a73 Upgrade to Spring Integration 4.0.6.RELEASE
Closes gh-2358
2015-01-14 11:39:03 +00:00
Andy Wilkinson 3ef768e76d Upgrade to Spring AMQP 1.3.8.RELEASE
Closes gh-2357
2015-01-14 11:38:45 +00:00
Andy Wilkinson 912060698d Upgrade to SLF4J 1.7.10
Closes gh-2336
2015-01-14 11:38:22 +00:00
Andy Wilkinson ca1716e9d6 Upgrade to Hibernate 4.3.8
Closes gh-2335
2015-01-14 11:38:02 +00:00
Phillip Webb 43d577aa4c Add Atmosphere sample application
Add Atmosphere example application based on
http://github.com/Atmosphere/atmosphere-samples/tree/master/samples/chat

Closes gh-2341
2015-01-13 15:42:14 -08:00
Phillip Webb 735b6277c2 Relax WebSocket auto-configuration conditions
Update WebSocketAutoConfiguration so that spring-websocket is no longer
required for WebSocket support.

See gh-2341
2015-01-13 15:42:14 -08:00
Andy Wilkinson 01444a03ab Merge branch '1.1.x' 2015-01-13 17:55:25 +00:00
Andy Wilkinson b875a00ebd Tighten up conditions: a web application may not be using Spring MVC
Previously, some classes that were annotatated with
@ConditionalOnWebApplication assumed that, if the application was a
web application, Spring MVC (spring-webmvc) would be on the classpath.
If it was not, the application would fail to start, typically with an
error relating to WebMvcConfigurerAdapter being unavailable.

This commit updates the affected configuration classes and annotates
them with @ConditionalOnClass(WebMvcConfigurerAdapter.class) to
ensure that their auto-configuration only takes effect if its a web
application and Spring MVC is on the classpath.

Fixes gh-2345
2015-01-13 17:51:10 +00:00
Dave Syer 5e0cc71862 Add convenient logging.properties for testing 2015-01-13 11:29:39 +00:00
Phillip Webb 3fc1e44302 Polish Mustache code 2015-01-12 13:16:23 -08:00
Stephane Nicoll bec5e96b94 Merge pull request #2323 from izeye/master
* pull2323:
  Fix copy/paste errors
2015-01-12 10:11:14 +01:00
izeye 4e109caf5c Fix copy/paste errors
Closes gh-2323
2015-01-12 10:10:10 +01:00
Dave Syer 2729c747ca Add jmustache support
The package names changed a bit from the prototype project, but wuth vanilla
autconfiguration usage that shouldn't matter. Follows closely the Groovy
templates support. Templates live in classpath:/templates/*.html by default.

Fixes gh-2242
2015-01-09 13:50:39 +00:00
Phillip Webb 9dd4d43cec Fixup version numbers following release 2015-01-08 00:19:04 -08:00
Spring Buildmaster 60725cd8bd Next development version 2015-01-07 23:37:07 -08:00
Phillip Webb 88f824845d Clarify documentation of relaxed binding
Update the "Relaxed binding" with a small table of common relaxed
property names and when they might be used.

Fixes gh-2234
2015-01-07 22:26:01 -08:00
Phillip Webb 6fbccbe61d Add a few more binding tests
See gh-2304
2015-01-07 22:24:32 -08:00
Phillip Webb 6056b96828 Fix relaxed binding of camel-case properties
Extended RelaxedDataBinder to include a case insensitive version of
SEPARATED_TO_CAMELCASE. This allow properties of the form TEST_THE_VALUE
to to bound to a @ConfigurationProperties class with a prefix of "test"
and a field of `theValue`.

Fixes gh-2304
2015-01-07 17:09:02 -08:00
Phillip Webb 3cd40e2488 Update getSupportedSourceVersion() logic
Use SourceVersion.latestSupported() rather than @SupportedSourceVersion
since we might build with an earlier JDK.

Fixes gh-2302
2015-01-07 15:04:09 -08:00
Phillip Webb 4c6907d5d8 Remove superfluous `\n` when logging password
The last trailing `\n` is not required as the logging system will add
it.

See gh-2146
2015-01-07 14:49:02 -08:00
Phillip Webb b6cb629974 Document the logger category used to show password
Fixes gh-2146
2015-01-07 14:48:34 -08:00
Phillip Webb 358ad0df37 Log stacktrace on additional metadata merge fail
See gh-2288
2015-01-07 14:07:28 -08:00
Phillip Webb 978cf8c2e6 Polish @WebIntegrationTest support
See gh-2299
2015-01-07 14:07:28 -08:00
Phillip Webb f9e83850ca Make IntegrationTestPropertiesListener public
Make IntegrationTestPropertiesListener public so that it can be used
when @TestExecutionListeners are declared on a parent class.

See gh-2135
2015-01-07 14:07:28 -08:00
Phillip Webb 10177fb754 Update @SupportedSourceVersion to RELEASE_8
Update the @SupportedSourceVersion annotation to RELEASE_8 since it
should indicate "the latest source version an annotation processor
supports".

Fixes gh-2302
2015-01-07 14:07:28 -08:00
Phillip Webb 64b9066661 Refine additional metadata detection logic
Update the additional metadata detection logic to deal with Gradle
folder layouts.

Fixes gh-2271
2015-01-07 14:07:28 -08:00
Andy Wilkinson 735b96dd0f Document how to configure multiple listeners when using Undertow
Closes gh-2191
2015-01-07 18:04:50 +00:00