Commit Graph

2518 Commits (a50646b7cc3ad941e748dfb450077e3a73706205)

Author SHA1 Message Date
Andy Wilkinson b1d8cc55fc Polish "Fix JSP availability check when not running as a packaged war"
Closes gh-12859
7 years ago
Mandap 82465cf435 Fix JSP availability check when not running as a packaged war
See gh-12859
7 years ago
Andy Wilkinson e7b03f7ca3 Don't auto-configure MultipartConfigElement when using Commons FileUpload
Previously, when a user had declared a custom MultipartResolver bean
that is a CommonsMultipartResolver, part resolution would fail. The
failure was occurring as the servlet container was consuming the parts
before CommonsMultipartResolver had a chance to read them. This was
happening because a MultipartConfigElement was being auto-configured.

This commit updates the multipart auto-configuration so that a
MultipartConfigElement is not auto-configured when there is a
CommonsMultipartResolver bean in the context.

Closes gh-7735
7 years ago
Stephane Nicoll 99f993bc82 Add tests for JndiConnectionFactoryAutoConfiguration
Closes gh-13526
7 years ago
Spring Buildmaster 36b8639853 Next Development Version 7 years ago
Brian Clozel 1b81f6f4c0 Fix security test with changes in SPR-16836
This commit replaces the use of a GET method by a DELETE method for
testing that the HiddenHttpMethodFilter is ordered before the security
filter. With SPR-16836 changes, only PUT DELETE and PATCH are now
allowed.
7 years ago
Stephane Nicoll c67aedd8bc Polish "Retrieve javax.cache.CacheManager using Bean ClassLoader"
Closes gh-13338
7 years ago
Martin Theiss 76b9d0d243 Retrieve javax.cache.CacheManager using Bean ClassLoader
This commit uses the bean's classloader to retrieve the CacheManager to
prevent issues with off-heap serialization.

See gh-13338
7 years ago
Stephane Nicoll f745f20c8c Clarify scope of JNDI-based MailSenderAutoConfiguration
This commit separates the auto-configuration of JavaMailSender in two
distinct configuration: one based on existing Session available on JNDI
and the other one based on properties configuration.

This clarifies the auto-configuration report and the fact that the JNDI
variant overrides any Session-related properties that would have been
set in the environment

Closes gh-13026
7 years ago
Phillip Webb 5243adce22 Restore Java 1.6 compatibility 7 years ago
Phillip Webb 4d84933ee4 Also call setHttpOnly property on Tomcat context
Update `ServerProperties` to also call `setHttpOnly` on the
`TomcatContext`. It appears that this is required in addition to
using the `ServletContextInitializer` to setup `SessionCookieConfig`.

Closes gh-12580
7 years ago
Stephane Nicoll 3118f14dbb Fix NPE when OnExpressionCondition is invoked with a null BeanFactory
Closes gh-13249
7 years ago
Phillip Webb 4853477081 Reformat code 7 years ago
Stephane Nicoll 8997143f31 Fix checkstyle violations 7 years ago
Phillip Webb 37646517cf Polish 7 years ago
Stephane Nicoll d9029ef69e Fix documentation of spring.kafka.producer.batch-size
Closes gh-13127
7 years ago
Stephane Nicoll b48f34117e Polish "Add support for Jersey WrappingResourceConfig"
Closes gh-13117
7 years ago
Zoltan Reegn dfcd87207f Add support for Jersey WrappingResourceConfig
See gh-13117
7 years ago
Spring Buildmaster 010b4fccbd Next development version 7 years ago
Phillip Webb 99dad81e9a Update copyright header year for changed files 7 years ago
Phillip Webb 0a0247975c Formatting 7 years ago
Stephane Nicoll 1314aaa368 Avoid early init of CacheManager
This commit restructures the Cache auto-configuration to avoid an early
init on CacheManager (and potentially all its infrastructure). Rather
than adding a dependency on the validator bean, this commit relies on
the fact CacheAspectSupport checks if a CacheManager is available in the
afterSingletonsInstantiated callback. In this case, a simple bean with
a postconstruct callback is enough.

Closes gh-13038
7 years ago
Phillip Webb 4e96587dc8 Polish modifier declaration ordering
Follow that Java language specification.
7 years ago
Phillip Webb 64930d4e5b Polish caught exception names
Prefer `ex` over `e`.
7 years ago
Phillip Webb 3ee777e142 Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the
the check.
7 years ago
Andy Wilkinson 06cf698387 Polish 7 years ago
Stephane Nicoll 08bc306a61 Guard IntegrationJmxConfiguration if no mBeanServer is available
Closes gh-12966
7 years ago
Andy Wilkinson df2372cd93 Avoid Kafka 0.10 destabilising the Windows build
Closes gh-12963
7 years ago
Spring Buildmaster c10aad165f Next Development Version 7 years ago
Spring Buildmaster ade4760842 Next Development Version 7 years ago
Phillip Webb 6b59814cbc Switch error views to use SimpleEvaluationContext
Update `ErrorMvcAutoConfiguration` to use `SimpleEvaluationContext`
rather than `StandardEvaluationContext`.

Fixes gh-12507
7 years ago
Phillip Webb dd0866000f Revert "Add text/plain error response support"
This reverts commit 23892e33d6.
7 years ago
Phillip Webb a8f366a554 Fix copyright header for edited files 7 years ago
Phillip Webb 23892e33d6 Add text/plain error response support
Refine `BasicErrorController` mappings so that only JSON and XML get
structured responses. A simple string response is returned for all
other media types.

Fixes gh-12513
7 years ago
igor-suhorukov 6bdfce5874 Polish
Closes gh-12422
7 years ago
Stephane Nicoll 66d1f5cd0b Fix expansion of static-locations array
This commit fixes a NPE when the static-locations array of
`ResourceProperties` has to be expanded as the setter is cleaning the
values of the array and is affected by a non-intuitive behaviour of the
binder.

When the binder needs to set an element of an array and the size of the
array isn't large enough, the binder proceeds as follows:

* An array of the required size is created
* The content of the original array is copied over
* The setter of the property is invoked with the new array
* The setter of the property is invoked and the returned array is
mutated to set the requested value

While one would expect the array to contain the requested value when the
setter is invoked, this is not the case. Also, the array might contain
null values if a value at index 8 should be set and the array has a size
of 3.

All in all, `ResourceProperties#appendSlashIfNecessary` has to account
for `null` and an additional round of cleaning has to happen once
binding has completed.

Closes gh-12360
7 years ago
Madhura Bhave c2f7dd86dc Revert default for CRSF enabled to false
Fixes gh-12267
7 years ago
Stephane Nicoll b4a7e1d64b Use toLowerCase() and toUpperCase() with Locale.ENGLISH
This commit updates all `toLowerCase()` and `toUpperCase` invocations to
use the variant that takes a `Locale` to avoid locale-specific side
effect.

Closes gh-12213
7 years ago
Madhura Bhave 4e61136948 Enable CSRF protection by default
See gh-11758
7 years ago
Andy Wilkinson 145d8d2673 Defer removal of Connectors until after ServletContext initialization
Previously, we removed the Connectors from Tomcat's Service before
the Context was started. The removal of the Connectors is required as
it prevents Tomcat from accepting requests before we're ready to
handle them.

Part of starting the Context is creating and initializing the
ServletContext. ServerProperties uses a ServletContextInitializer to
set the session tracking modes and Tomcat rejects the SSL tracking
mode if there is no SSL-enabled connector available. With the previous
arrangement this led to a failure as the Connectors had been removed
so the SSL-enabled connector could not be found.

This commit updates the embedded Tomcat container to defer the
removal of the Connectors until after the context has been started
but still at a point that is before the Connectors themselves would
have been started.

Closes gh-12058
7 years ago
Phillip Webb 798522d890 Format with Eclipse Oxygen SR2 7 years ago
Spring Buildmaster 6414b42335 Next Development Version 7 years ago
Phillip Webb 61f7bd8576 Polish 7 years ago
Stephane Nicoll 11f700aa9d Fix handling of redis password containing a colon
Closes gh-11371
7 years ago
Andy Wilkinson 5a74f63f7c Polish "Configure ErrorReportValve not to report stack traces"
Closes gh-11790
7 years ago
Alex Panchenko 29736e340e Configure ErrorReportValve not to report stack traces
See gh-11790
7 years ago
Andy Wilkinson c06956376c Use correct Assert class in ServerPropertiesAutoConfiguration 7 years ago
Phillip Webb 8e783cdae9 Polish 7 years ago
Stephane Nicoll 6c191e149d Fix broken usage of LiquibaseServiceLocatorApplicationListener 7 years ago
Stephane Nicoll 8529913b24 Improve error message when no ServerProperties bean is found
Closes gh-11511
7 years ago