Commit Graph

9326 Commits (dda84749efd740fa23a22ffe6209643764355fdb)
 

Author SHA1 Message Date
Phillip Webb 357d072a60 Polish 8 years ago
Andy Wilkinson 491bd745de Document Jersey's package scanning limitations
Closes gh-7496
8 years ago
Stephane Nicoll 5e604437d7 Restore proper scope for spring-hateoas
Closes gh-7489
8 years ago
Andy Wilkinson c6bdd136b1 Merge pull request #7271 from Aleksander Bartnikiewicz
* gh-7271:
  Test that a broken factory bean does not break resetting of mocks
  Prevent a broken factory bean from breaking the resetting of mocks
8 years ago
Andy Wilkinson 46e8cf4a43 Test that a broken factory bean does not break resetting of mocks
Previously, ResetMocksTestExecutionListener used getBean(name) to
retrieve each instantiated singleton. When the instantiated singleton
was a factory bean, this would cause getObject on the factory bean to
be called. If the factory bean was unable to produce its object, for
example due to test slicing excluding something, an exception would
be thrown.

The previous commit updated ResetMocksTestsExecutionListener to
use getSingleton(name) rather than getBean(name).  This will retrieve
the factory bean itself rather than causing the factory bean to
attempt to create an object. This commit updates the tests to verify
the new behaviour.

Closes gh-7270
8 years ago
Aleksander Bartnikiewicz eb927f1b29 Prevent a broken factory bean from breaking the resetting of mocks
Closes gh-7271
8 years ago
Andy Wilkinson e19c6245ef Consider endpoints.sensitive when endpoints.health.sensitive is not set
Closes gh-7476
8 years ago
Stephane Nicoll 1f8281931d Merge pull request #7462 from kuhnroyal:gh-7460
* pr/7462:
  Polish contribution
  Fix undertow session persistence with spring-boot-devtools
8 years ago
Stephane Nicoll 4c61c9f26a Polish contribution
Closes gh-7462
8 years ago
Peter Leibiger 203b6f2f2c Fix undertow session persistence with spring-boot-devtools
Fixes gh-7460
8 years ago
Stephane Nicoll 65b6d8f4f7 Handle `NoClassDefFoundError` in `OnBeanCondition`
If `OnBeanCondition` is used with a `String` literal representing the
fully qualified name of a bean and such type does not exist, it
gracefully manages it as if it was not found. Prior to this commit, an
exception would be thrown if any related class such as the parent
class does not exist.

This commit handles this additional case, catching `NoClassDefFoundError`
the same way it did handle `ClassNotFoundException`. That way, a
missing type will now be considered as absent if it's not on the
classpath.

Closes gh-7459
8 years ago
Stephane Nicoll 4bf645c615 `AutoconfigureTestDatabase` replace with a fresh database
Previously, two or more `@DataJpaTest` tests in the same test suite were
sharing the same in-memory database instance. This commit makes sure
that `TestDatabaseAutoConfiguration` creates a unique embedded database
for each test it operates on.

Closes gh-7473
8 years ago
Stephane Nicoll 0359b2f6f5 Document how to disable JMS transacted session
Closes gh-7463
8 years ago
Stephane Nicoll 5e8ba5cef6 Fix Couchbase condition on Spring Data class
This commit reverts 7e2d0fd so that the Couchbase auto-configuration can
work without Spring Data again. It also removes the `Class` reference to
a Spring Data class to a `String` reference to make sure the condition
operates properly when said class isn't on the classpath.

Closes gh-7453
8 years ago
Andy Wilkinson 5e79657d4b Treat URLs for same file in nested archive and from jar root as equal
Consider the following two URLs:

jar:file:/test.jar!/BOOT-INF/classes!/foo.txt
jar:file:/test.jar!/BOOT-INF/classes/foo.txt

They both reference the same foo.txt file in the BOOT-INF/classes
directory of test.jar, however the first URL does so via the
nested BOOT-INF/classes archive. Previously, this difference in the
URLs would lead to PathMatchingResourcePatternResolver returning two
resources for foo.txt when asked to find all resources matching the
pattern classpath*:/**/*.txt.

This commit updates our Handler that is used for jar: URLs to consider
the two URLs above to be equivalent such that url1 is equal to url2
and the two urls will produce the same hash code.

Closes gh-7449
8 years ago
Stephane Nicoll a5681c018d Add dependency management for hazelcast-client
Closes gh-7452
8 years ago
Phillip Webb 74670cb20f Allow WebDriver beans to define their own scope
Update `WebDriverScope` so that only `WebDriver` beans with no explicit
scope are moved.

Fixes gh-7454
8 years ago
Phillip Webb 7e2d0fd1c0 Check for Spring Data before configuring Couchbase
Add guard to `CouchbaseAutoConfiguration` so ensure that Spring Data
Couchbase is on the classpath.

Fixes gh-7453
8 years ago
Phillip Webb 288398b8b7 Merge pull request #7425 from PostalBear/1.4.x
* pr/7425:
  Add additional Tomcat timeout test
  Fix connector used to configure connection timeout
8 years ago
Phillip Webb ce58e16860 Add additional Tomcat timeout test
Update the Tomcat sample to also test that the connection timeout is
set.

See gh-7425
8 years ago
Grigory Fadeev 1ea829e003 Fix connector used to configure connection timeout
Fix Tomcat customization so that the main connection is configured with
any timeout.

Closes gh-7425
8 years ago
Phillip Webb a3b79be6b3 Support @MockBean on FactoryBeans
Update @MockBean support so that FactoryBean classes can be mocked.

Fixes gh-7439
8 years ago
Phillip Webb 1452d3cd51 Ensure withBasicAuth keeps error handler
Fix `TestRestTemplate` so that any custom `ErrorHandler` isn't lost
when calling `withBasicAuth`.

Fixes gh-7441
8 years ago
Andy Wilkinson 3423ca87b4 Ensure that RestClientTest can be used without Jackson on the class path
Closes gh-7431
8 years ago
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
8 years ago
Andy Wilkinson c9427191ee Set TCCL before initialising test class in FilteredClassPathRunner
Closes gh-7435
8 years ago
Stephane Nicoll 249ed899a6 Fix use of KB and MB in Multipart documentation
Closes gh-7364
8 years ago
Phillip Webb fce17ca6d9 Polish 8 years ago
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
8 years ago
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
8 years ago
Andy Wilkinson 5857010dde Polishing: fix Checkstyle warning 8 years ago
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
8 years ago
Andy Wilkinson b3e0a37197 Remove unwanted System.out calls in test code 8 years ago
Phillip Webb bacf0878af Polish 8 years ago
Andy Wilkinson 948b5760a7 Upgrade to Spring Retry 1.1.5.RELEASE
Closes gh-7384
8 years ago
Andy Wilkinson c2730ac63f Polish formatting and address warnings 8 years ago
Stephane Nicoll 8a57ebde06 Merge pull request #7370 from ultraq:update-layout-dialect
* pr/7370:
  Upgrade Thymeleaf 3 layout dialect in doc
8 years ago
Emanuel Rabina 6b681ddfab Upgrade Thymeleaf 3 layout dialect in doc
Closes gh-7370
8 years ago
Andy Wilkinson a1dda12bcb Disable Server header by default when using SSL with Jetty 9
Closes gh-7359
8 years ago
Stephane Nicoll 72e696bcbd Fixup version numbers following release 8 years ago
Spring Buildmaster e712a9ba8c Next Development Version 8 years ago
Stephane Nicoll 2a8a906d30 Upgrade to Spring AMQP 1.6.5.RELEASE
Closes gh-7347
8 years ago
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
8 years ago
Andy Wilkinson 5f44598d8b Remove use of static import that Checkstyle prohibits 8 years ago
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
8 years ago
Andy Wilkinson 808185ab4e Make LaunchedURLClassLoader Java 6 compatible again
Closes gh-7334
8 years ago
Andy Wilkinson aafb308eaf Merge pull request #7334 from Christoph Dreis
* gh-7334:
  Reinstate LaunchedURLClassLoader's registration  as parallel capable
8 years ago
dreis 7a797909ae Reinstate LaunchedURLClassLoader's registration as parallel capable
Closes gh-7334
8 years ago
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
8 years ago
Stephane Nicoll 18c2a2f4fe Upgrade to Spring Framework 4.3.4.RELEASE
Closes gh-7213
8 years ago