Commit Graph

9055 Commits

Author SHA1 Message Date
Phillip Webb
a3b79be6b3 Support @MockBean on FactoryBeans
Update @MockBean support so that FactoryBean classes can be mocked.

Fixes gh-7439
2016-11-22 13:49:28 -08:00
Phillip Webb
1452d3cd51 Ensure withBasicAuth keeps error handler
Fix `TestRestTemplate` so that any custom `ErrorHandler` isn't lost
when calling `withBasicAuth`.

Fixes gh-7441
2016-11-22 10:58:30 -08:00
Andy Wilkinson
3423ca87b4 Ensure that RestClientTest can be used without Jackson on the class path
Closes gh-7431
2016-11-21 13:36:05 +00: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
Andy Wilkinson
c9427191ee Set TCCL before initialising test class in FilteredClassPathRunner
Closes gh-7435
2016-11-21 10:41:41 +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
5dea4c5a03 Wait for server port to be written in a more robust manner
Previously, we just waited for the file to exist before trying to read
the port from it. This left a window where the file existed but its
contents had not be written which could result in a
NumberFormatException.

This commit now waits for the file to have a length that is greater
than zero.

See gh-7379
2016-11-17 20:41:25 +00:00
Andy Wilkinson
5857010dde Polishing: fix Checkstyle warning 2016-11-17 19:55:34 +00:00
Andy Wilkinson
918e122ddc Fix remote DevTools' support for adding and removing classes
Previously, remote DevTools only correctly supported modifying
existing classes. New classes that were added would be missed, and
deleted classes could cause a failure as they would be found by
component scanning but hidden by RestartClassLoader.

This commit introduces a DevTools-specific ResourcePatternResolver
that is installed as the application context's resource loader. This
custom resolver is aware of the files that have been added and
deleted and modifies the result returned from getResource and
getResources accordingly.

New intergration tests have been introduced to verify DevTools'
behaviour. The tests cover four scenarios:

- Adding a new controller
- Removing an existing controller
- Adding a request mapping to a controller
- Removing a request mapping from a controller

These four scenarios are tested with:

- DevTools updating a local application
- DevTools updating a remote application packaged in a jar file
- DevTools updating a remote application that's been exploded

Closes gh-7379
2016-11-17 19:19:54 +00:00
Andy Wilkinson
b3e0a37197 Remove unwanted System.out calls in test code 2016-11-16 09:12:13 +00:00
Phillip Webb
bacf0878af Polish 2016-11-15 10:40:21 -08:00
Andy Wilkinson
948b5760a7 Upgrade to Spring Retry 1.1.5.RELEASE
Closes gh-7384
2016-11-15 15:49:11 +00:00
Andy Wilkinson
c2730ac63f Polish formatting and address warnings 2016-11-15 11:48:35 +00:00
Stephane Nicoll
8a57ebde06 Merge pull request #7370 from ultraq:update-layout-dialect
* pr/7370:
  Upgrade Thymeleaf 3 layout dialect in doc
2016-11-12 11:15:53 +01:00
Emanuel Rabina
6b681ddfab Upgrade Thymeleaf 3 layout dialect in doc
Closes gh-7370
2016-11-12 11:15:00 +01:00
Andy Wilkinson
a1dda12bcb Disable Server header by default when using SSL with Jetty 9
Closes gh-7359
2016-11-11 11:46:57 +00:00
Stephane Nicoll
72e696bcbd Fixup version numbers following release 2016-11-08 18:24:42 +01:00
Spring Buildmaster
e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Stephane Nicoll
2a8a906d30 Upgrade to Spring AMQP 1.6.5.RELEASE
Closes gh-7347
2016-11-08 17:03:07 +01:00
Andy Wilkinson
2c4f39045f Stop relying on Artemis's on-demand queue creation in CLI JMS test
Artemis's on-demand queue cretaion appears to be rather flakey,
sometimes failing with a NullPointerException.

This commit ensures that the queue used by the sample is created
during start up rather than on demand. This will hopefully make the
test that runs the sample more robust.

Closes gh-7346
2016-11-08 14:36:58 +00:00
Andy Wilkinson
5f44598d8b Remove use of static import that Checkstyle prohibits 2016-11-08 13:50:15 +00:00
Andy Wilkinson
33dcd853fd Ensure that health endpoint remains insecure without Spring Security
The changes made in 6a2ac080 mean that getSecurity() on
ManagementServerProperties will no longer return null when Spring
Security is on the classpath. This had the unwanted side-effect of
causing the health endpoint to hide its details when Spring Security
was not on the classpath.

This commit reinstates the previous behaviour by only considering
the health endpoint to be secure if Spring Security is on the
classpath and management.security.enabled is true.

Closes gh-7345
2016-11-08 13:18:05 +00:00
Andy Wilkinson
808185ab4e Make LaunchedURLClassLoader Java 6 compatible again
Closes gh-7334
2016-11-08 10:35:18 +00:00
Andy Wilkinson
aafb308eaf Merge pull request #7334 from Christoph Dreis
* gh-7334:
  Reinstate LaunchedURLClassLoader's registration  as parallel capable
2016-11-08 10:02:55 +00:00
dreis
7a797909ae Reinstate LaunchedURLClassLoader's registration as parallel capable
Closes gh-7334
2016-11-08 09:58:14 +00:00
Stephane Nicoll
318701daa7 Apply DispatcherServlet customizations to MockMvc
This commits makes sure that customizations on `DispatcherServlet` are
also applied to the `TestDispatcherServlet` that `MockMvc` is using
internally.

Closes gh-5891
2016-11-08 10:56:54 +01:00
Stephane Nicoll
18c2a2f4fe Upgrade to Spring Framework 4.3.4.RELEASE
Closes gh-7213
2016-11-08 07:48:53 +01:00
Andy Wilkinson
adfc5d22ca Upgrade to Spring Integration Java DSL 1.1.4.RELEASE
Closes gh-7342
2016-11-08 06:44:47 +00:00
Andy Wilkinson
bc2a412408 Upgrade to Spring Integration 4.3.5.RELEASE
Closes gh-7341
2016-11-08 06:44:15 +00:00
Andy Wilkinson
e136ef6f7d Upgrade to Spring AMQP 1.6.4.RELEASE
Closes gh-7340
2016-11-08 06:43:42 +00:00
Andy Wilkinson
42581debfe Upgrade to Spring Security OAuth 2.0.12.RELEASE
Closes gh-7339
2016-11-08 06:38:48 +00:00
Stephane Nicoll
d405265e83 Merge pull request #7326 from sebastiankirsch:master
* pr/7326:
  Polish contribution
  Add @Inherited to all AutoConfigure* classes
2016-11-06 11:43:58 +01:00
Stephane Nicoll
ebfd86ea26 Polish contribution
Closes gh-7326
2016-11-06 11:42:45 +01:00
sebastiankirsch
e8b0a64872 Add @Inherited to all AutoConfigure* classes
See gh-7326
2016-11-06 11:39:12 +01:00
Stephane Nicoll
f80dbd1a21 Upgrade to joda-time 2.9.5
Closes gh-7308
2016-11-06 11:34:13 +01:00
Stephane Nicoll
32950bfec1 Merge pull request #7299 from vpavic:resource-server-config
* pr/7299:
  Fix JWT token URI derivation
2016-11-06 11:25:15 +01:00
Vedran Pavic
5783cd5593 Fix JWT token URI derivation
Closes gh-7299
2016-11-06 11:24:50 +01:00
Stephane Nicoll
4311cf333f Remove sample reference in build 2016-11-05 11:14:50 +01:00
Stephane Nicoll
2c71cb8efd Polish 2016-11-05 11:10:17 +01:00
Stephane Nicoll
4407194c00 Replace sample by integration test
Closes gh-3888
2016-11-05 11:09:36 +01:00
Stephane Nicoll
44a32d0a5b Merge pull request #7322 from izeye:polish-20161105
* pr/7322:
  Polish
2016-11-05 07:42:50 +01:00
Johnny Lim
ec9f0ab6b4 Polish
Closes gh-7322
2016-11-05 07:42:37 +01:00
Phillip Webb
1bd53ea9d8 Support package private requestFactory classes
Update `RestTemplateBuilder` to support package private `requestFactory`
classes.

Fixes gh-7319
2016-11-04 15:58:27 -07:00
Phillip Webb
90afc8ebbe Formatting 2016-11-03 14:48:10 -07:00
Phillip Webb
6a2ac080ac Create our own SessionCreationPolicy enum
Update `ManagementServerProperties` so that `security.sessions` no
longer uses `SessionCreationPolicy` from Spring Security. We now
use our own enun which allows `management.security.*` properties to
be set without the risk of a `ClassNotFoundException`.

Fixes gh-3888
2016-11-03 14:36:49 -07:00
Andy Wilkinson
97e5e32496 Make sure the MetricsFilter uses committed response's status
Previously, if an exception was thrown during request handling after
the response had been committed, i.e. after the status and headers
had been written, the metrics filter would assume that it was a 500
response. This was potentially inaccurate as the status had already
been sent to the client and before the exception was thrown and it
may have been something other than a 500.

This commit updates MetricsFilter so that it will use the
status from the response if the response has been committed even when
an exception is thrown.

Closes gh-7277
2016-11-03 20:08:31 +00:00
Andy Wilkinson
6a87df8e46 Upgrade to Spring Data Hopper SR5
Closes gh-7275
2016-11-03 18:54:42 +00:00
Madhura Bhave
b04a74f01d Fix failure analysis for Collections and Maps
Closes gh-6996
2016-11-03 10:14:01 -07:00