Commit Graph

2486 Commits

Author SHA1 Message Date
Phillip Webb
a8f366a554 Fix copyright header for edited files 2018-03-16 15:07:23 -07:00
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
2018-03-16 14:30:42 -07:00
igor-suhorukov
6bdfce5874 Polish
Closes gh-12422
2018-03-12 15:35:08 +01:00
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
2018-03-06 15:19:59 +01:00
Madhura Bhave
c2f7dd86dc Revert default for CRSF enabled to false
Fixes gh-12267
2018-02-28 08:54:43 -08:00
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
2018-02-26 17:49:03 +01:00
Madhura Bhave
4e61136948 Enable CSRF protection by default
See gh-11758
2018-02-16 14:43:50 -08:00
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
2018-02-14 17:04:55 +00:00
Phillip Webb
798522d890 Format with Eclipse Oxygen SR2 2018-02-08 15:46:49 -08:00
Spring Buildmaster
6414b42335 Next Development Version 2018-01-30 23:29:33 +00:00
Phillip Webb
61f7bd8576 Polish 2018-01-30 12:37:40 -08:00
Stephane Nicoll
11f700aa9d Fix handling of redis password containing a colon
Closes gh-11371
2018-01-30 10:27:26 +01:00
Andy Wilkinson
5a74f63f7c Polish "Configure ErrorReportValve not to report stack traces"
Closes gh-11790
2018-01-29 19:50:07 +00:00
Alex Panchenko
29736e340e Configure ErrorReportValve not to report stack traces
See gh-11790
2018-01-29 17:23:49 +00:00
Andy Wilkinson
c06956376c Use correct Assert class in ServerPropertiesAutoConfiguration 2018-01-22 10:49:47 +00:00
Phillip Webb
8e783cdae9 Polish 2018-01-18 21:42:11 -08:00
Stephane Nicoll
6c191e149d Fix broken usage of LiquibaseServiceLocatorApplicationListener 2018-01-16 11:43:36 +01:00
Stephane Nicoll
8529913b24 Improve error message when no ServerProperties bean is found
Closes gh-11511
2018-01-16 09:53:08 +01:00
Stephane Nicoll
7b3bedc468 Fix detection of dot-based resource bundle basenames
This commit makes sure that properties-based resource bundle location
with a dot is detected. It also harmonizes the description of the
configuration key as our support is not stricly matching the convention.

Closes gh-10092
2018-01-09 13:18:48 +01:00
Johnny Lim
d2109ddf4d Use MongoClient consistently
Closes gh-11431
2017-12-27 17:01:59 +01:00
Stephane Nicoll
29565a7981 Polish 2017-12-14 10:59:23 +01:00
Stephane Nicoll
dbae4fc1c3 Make it easier to use jOOQ with several data sources
Closes gh-11324
2017-12-14 09:33:10 +01:00
Phillip Webb
6a55623910 Polish 2017-12-13 12:21:57 -08:00
Stephane Nicoll
7b8adfab41 Polish 2017-11-30 18:00:43 +01:00
Stephane Nicoll
d920b49ba1 Polish
See gh-11193
2017-11-29 10:47:09 +01:00
Spring Buildmaster
df2ae7aa19 Next Development Version 2017-11-28 09:55:46 +00:00
Andy Wilkinson
137d3f3533 Test Flyway location checking with implicit classpath: prefix
Closes gh-10894
2017-11-23 11:44:25 +00:00
Andy Wilkinson
d4e19f8170 Auto-configure jOOQ after transaction auto-configuration
jOOQ auto-configuration will make use of a PlatformTransactionManager
bean if available. This commit ensures that jOOQ is auto-configured
after transaction auto-configuration, thereby ensuring that any
auto-configuration PlatformTransactionManager bean can be consumed.

Closes gh-11052
2017-11-23 11:33:16 +00:00
Stephane Nicoll
fc3d25d705 Properly document spring.data.neo4j.open-in-view's default value
Closes gh-10826
2017-10-30 16:22:10 +01:00
Marten Deinum
ab3d65ccae Polish JobLauncherCommandLineRunner
The JobLauncherCommandLineRunner reassigned method arguments inside the
merge method. Instead of reassigning the method argument just return
the new instance directly.

Also some minor cleanup (unnesseccary null check and continue keyword).

Closes gh-10612
2017-10-28 07:57:14 +02:00
Stephane Nicoll
81e33dc801 Fix NPE in url is null and no embedded database is available
Closes gh-10626
2017-10-25 13:57:00 +02:00
Spring Buildmaster
c0f9f64776 Next Development Version 2017-10-16 12:36:43 +00:00
Andy Wilkinson
ffdff1cdc2 Consider multiple MBeanExporters when excluding beans from export
Closes gh-10632
2017-10-13 12:31:57 +01:00
Johnny Lim
bfa291f671 Polish 2017-10-02 15:07:03 +01:00
Andy Wilkinson
616d11c00a Only wait for background preinit to complete when it has started
Closes gh-10362
2017-09-25 17:06:28 +01:00
Eddú Meléndez
93844bffbc Polish JacksonAutoConfiguration
This commit removes unused constructor parameters introduced in 0c2ecb7.

Closes gh-10412
2017-09-25 10:05:29 +02:00
Stephane Nicoll
d490b99473 Clarify scope of spring.datasource.platform
Closes gh-10416
2017-09-25 10:04:37 +02:00
Stephane Nicoll
61ae92992b Polish "Document default value change for proxy-target-class"
Closes gh-10134
2017-09-16 06:46:36 +02:00
Stephane Nicoll
fbb6b88155 Document default prefix/suffix values
Closes gh-10290
2017-09-15 12:47:46 +02:00
Stephane Nicoll
b309495c2e Polish 2017-09-15 12:36:11 +02:00
Spring Buildmaster
30eb937a83 Next Development Version 2017-09-12 10:54:22 +00:00
Andy Wilkinson
5938df52ea Stop auto-config of MethodValidationPP triggering early init
Previously, if a user's configuration class provided a custom
Validator bean, that configuration class would be initialized very
early so that the Validator could be used to create the
auto-configured MethodValidationPostProcessor. This early
initialization could problems as it may prevent any of the
configuration class's dependencies from being post-processed.

This commit updates the injection of the Validator bean to be lazy,
thereby preventing the creation of the auto-configured
MethodValidationPostProcessor from triggering early initialization.

Closes gh-9416
2017-09-11 11:52:38 +01:00
Stephane Nicoll
db18abc542 Fix Elasticsearch template condition if no client is defined
This commit makes sure to backoff if a Client bean is not available.

Closes gh-10143
2017-09-07 10:32:21 +02:00
Stephane Nicoll
5fc01880bc Polish 2017-09-07 09:55:50 +02:00
Madhura Bhave
64ffcfc83f Document JWK property
Closes gh-10022
2017-08-29 12:51:14 -07:00
Paul Vorbach
04ca7f137d Identify and fix incomplete assertions
Several calls to assertThat lacked a following assertion most often due
to wrong use of parenthesis.

See gh-10084
2017-08-29 13:49:28 +02:00
Madhura Bhave
9b5e5f32e1 ClientId not always required for client credentials
Fixes gh-10013
2017-08-27 23:23:00 -07:00
Stephane Nicoll
fa037610f8 Add missing class check on Neo4jDataAutoConfiguration
Neo4jDataAutoConfiguration is meant to kick in when Spring Data Neo4J is
on the classpath. Yet, we were only checking for the presence of neo4j
itself and the transaction manager provided by spring-tx.

This commit makes sure to back off if Spring Data Neo4J is not present.

Closes gh-10038
2017-08-18 12:07:59 +02:00
Stephane Nicoll
dbaaf2a5fa Improve conditions on FreeMarkerWebConfiguration
This commit makes sure to prevent the Freemarker web auto-configuration
to kick in if `spring-webmvc` is not on the classpath.

Closes gh-10027
2017-08-17 13:28:45 +02:00
Andy Wilkinson
e08d09f5a3 Polish "Fix logged property names when initializing OAuth2 client"
See gh-9944
2017-08-09 11:26:56 +01:00