Commit Graph

9262 Commits (f46e3dc9f38aec1ba0271d54464a2714f553c7a8)
 

Author SHA1 Message Date
Stephane Nicoll 9a9c4c75bf Merge pull request #8030 from michael-simons:fix-appendix-b
* pr/8030:
  Fix closing parentheses
8 years ago
Michael J. Simons a852c49edd Fix closing parentheses
Closes gh-8030
8 years ago
Stephane Nicoll ffa6d6d6e0 Improve error message used in TestDatabaseAutoConfiguration
By default, `@DataJpaTest` (and `@AutoConfigureTestDatabase`) attempt to
replace any existing `DataSource` by an embedded one. Previously, if
there is was no embedded database on the classpath, the exception message
did not provide that context in the error message.

This commit clarifies the error message to conduct
`TestDatabaseAutoConfiguration` (that is replacing the existing
`DataSource`).

Closes gh-7797
8 years ago
Andy Wilkinson 80a1e1ae64 Polishing 8 years ago
Andy Wilkinson b7a02e7237 Update TestRestTemplate to apply template handler to URIs
Previously, TestRestTemplate would only apply the UriTemplateHandler
to Strings and not to URIs. When using the auto-configured
TestRestTemplate, this prevented relative URIs from being
made absolute using LocalHostUriTemplateHandler.

The commit updates TestRestTemplate to turn URIs into Strings before
passing them to the delegate RestTemplate. Turning them into Strings
ensures that the delegate calls the UriTemplateHandler.

Closes gh-7891
8 years ago
Andy Wilkinson 6a0fb8e44c Update DevTools' ResourceLoader to delegate to user's custom loader
Previously, when DevTools' was used it would set the application
context's ResourceLoader and overwrite any custom ResourceLoader that
had been configured. On the rare occasion when the user had customized
the ResourceLoader this meant that the customization was lost and
certain resources would become unavailable.

This commit updates DevTools' ResourceLoader to delegate a custom
ResourceLoader if one has been configured. If one has not been
configured it delegates as before, i.e. to
WebApplicationContextResourceLoader for web applications and to
DefaultResourceLoader for all others apps.

Closes gh-8010
8 years ago
Phillip Webb b28d537c78 Disable unwanted m2e activations
Add m2e activation properties to disable unwanted Eclipse facets.
8 years ago
Stephane Nicoll b242543545 Backport missing 3rd party starter reference 8 years ago
Stephane Nicoll b7d3e91e38 Merge pull request #8014 from larsgrefer:patch-1
* pr/8014:
  Add OkHttp starter reference
8 years ago
Lars Grefer f5d1b7807c Add OkHttp starter reference
Closes gh-8014
8 years ago
Andy Wilkinson 0e72ef1a10 Improve diagnostics for in StarterDependenciesIntegrationTests
The root cause of the build failure something has a null message which
means there's no information available about why the build failed.
Instead of calling fail when a BuildException occurs, this commit
wraps it in a RuntimeException and rethrows it. This should make the
entire chain of exceptions available when a failure occurs.
8 years ago
Andy Wilkinson 2a5586fbcf Ensure that JarResourceManager correctly handles path without leading /
Previously, JarResourceManager assumed that the path would begin with
a / but this isn't always the case. For example, it may be an empty
string. This could lead to a malformed jar:file: URL that used ! as
the separator rather than the required !/.

This commit updates JarResourceManager to prepend / to any path that
does not being with one before using it to construct the URL.

Closes gh-7717
8 years ago
Andy Wilkinson a02c2d4155 Improve the documentation of Health.Status constants
Closes gh-7784
8 years ago
Andy Wilkinson 9695e0a9d1 Document breakpoint config for remote debug tunnel and IntelliJ IDEA
Closes gh-7732
See gh-5047
8 years ago
Andy Wilkinson 0463350d2e Document that spring(Profile|Property) cannot be used with scan=true
Closes gh-5611
8 years ago
Andy Wilkinson 69320180d9 Make FileSystemWatcherTests.waitsForPollingInterval more robust
The intent of the test is to:

1. Make a change
2. Sleep for long enough for that change to be picked up
3. Make another change
4. Stop that watcher after 1 further scan has been performed
5. Assert that a further scan was performed by checking that two
   separate sets of changes (step 1 and step 3) have been picked up

Previously, step 2 relied on simply sleeping for a period of time
longer than the polling interval. In reality, the polling interval
is only a minimum time between scans and the actual time between them
depends on thread scheduling, GC pauses, etc. This lead to the
test failing intermittently if the scan didn't happen in a timely
manner.

This commit removes the sleep and replaces it with a while loop that
waits for first change to be picked up. This ensures that the second
change will be detected separately from the first and that two
separate change sets should always be available once the watcher has
stopped.

See gh-7782
8 years ago
Andy Wilkinson 7c2664f959 Ensure that jar entry names use forward slashes, even on Windows
Previously, in the DevTools integration tests, portions of a File's
path were used to create the name of a jar entry. On Windows this
resulted in the entry containing \ characters. As a result the
directory structure was incorrect and the classes could not be loaded
from the jar.

This commit ensures that any \ characters are replaced with /
characters.

See gh-7782
8 years ago
Andy Wilkinson a72365e1a2 Expose context hierarchy in beans endpoint
Previously, the beans endpoint would only expose the context that
contained the endpoint. This commit updates the endpoint so that
the context that contains the endpoint and all of its ancestors are
exposed.

In a context hierarhcy, the relation ship is child -> parent and there
is no way to navigate from a parent to a child. As a result, any
contexts that are descendants of the context containing the endpoint
are not exposed.

Closes gh-5188
8 years ago
Stephane Nicoll dbee44a6b5 Merge pull request #7997 from slaskawi:ISPN-6561/Infinispan_starters
* pr/7997:
  Add Infinispan starter reference
8 years ago
Sebastian Laskawiec 16de86f917 Add Infinispan starter reference
Closes gh-7997
8 years ago
Andy Wilkinson 7f492a56c2 Merge pull request #4902 from Karsten Sperling
* gh-4902:
  Test that double registration of ServletContextInitializers does not happen
  Avoid double-reg when a Servlet or Filter implements ServletContextInitializer
8 years ago
Andy Wilkinson 5158f6e5fc Test that double registration of ServletContextInitializers does not happen
Closes gh-4902
8 years ago
Karsten Sperling 600e74b6c9 Avoid double-reg when a Servlet or Filter implements ServletContextInitializer
See gh-4902
8 years ago
Stephane Nicoll c04fd325f1 Merge pull request #7993 from vpavic:gh-7944
* pr/7993:
  Document use of `OpenEntityManagerInViewInterceptor`
8 years ago
Vedran Pavic a7fce6b048 Document use of `OpenEntityManagerInViewInterceptor`
Closes gh-7993
8 years ago
Andy Wilkinson f92719c4be Remove unwanted override of git-commit-id-plugin's version 8 years ago
Andy Wilkinson d2201d5284 Correct copyright dates and enforce that starting year is 2012
Closes gh-7923
8 years ago
Andy Wilkinson bf642ff9db Continue failure analysis when an analyzer throws an exception
Previously, if a failure analyzer threw an exception from its
analyze method, failure analysis would stop.

This commit updates FailureAnalyzers to catch and log any Throwable
thrown by an analyzer and continue to the next available analyzer.

Closes gh-7956
8 years ago
Andy Wilkinson 7298b2dc1b Set value of javax.servlet.error.exception_type to a Class not a String
Previously, ErrorPageFilter set the value of
javax.servlet.error.exception_type to be the name of the exception,
(a java.lang.String). This commit changes it to be a java.lang.Class
as required by the Servlet spec.

Closes gh-7925
8 years ago
Andy Wilkinson 6f7d1de167 Remove redundant logic from OAuth2MethodSecurityConfiguration
Previously, OAuth2MethodSecurityConfiguration set the
PermissionEvaluator on the expression evaluator by looking in the
context for a PermissionEvaluator bean. This is unnecessary as
GlobalMethodSecurityConfiguration already does the same thing and does
so after the post-processor in OAuth2MethodSecurityConfiguration has
run. This commit removes the redundant logic and adds tests to check
that both the PermissionEvaluator and the RoleHierarchy are set use
beans in the context.

Closes gh-7979
8 years ago
Andy Wilkinson 8b0ecab181 Add dependency management for spring-plugin-metadata
Closes gh-7864
8 years ago
Stephane Nicoll a427982d77 Merge pull request #7911 from drumonii:fix-configure-a-datasource-doc-ref-link
* pr/7911:
  Fix configure a datasource reference doc link
8 years ago
drumonii bb5819b879 Fix configure a datasource reference doc link
Closes gh-7911
8 years ago
Andy Wilkinson bb4777c920 Merge pull request #7937 from Michael Simons
* gh-7937:
  Update springloaded version to 1.2.6.RELEASE in Maven-related docs
8 years ago
Michael J. Simons 3c291150d6 Update springloaded version to 1.2.6.RELEASE in Maven-related docs
Closes gh-7937
8 years ago
Andy Wilkinson 6a9397283c Merge pull request #7937 from Michael Simons
* gh-7937:
  Update springloaded version to 1.2.6.RELEASE in Gradle-related docs
8 years ago
Michael J. Simons ddca9a1687 Update springloaded version to 1.2.6.RELEASE in Gradle-related docs
Closes gh-7937
8 years ago
Stephane Nicoll 7c161b9920 Merge pull request #7907 from eddumelendez:fix_assertions
* pr/7907:
  Fix incomplete assertions
8 years ago
Eddú Meléndez f896ff9a10 Fix incomplete assertions
Closes gh-7907
8 years ago
Stephane Nicoll b9eda3f26b Document favicon support
Closes gh-7903
8 years ago
Phillip Webb 21bfe52694 Add test to check class resources aren't exposed
Closes gh-7880
8 years ago
Phillip Webb 6bc37c0589 Drop annotation processor spring-core dependency
Remove the spring-core dependency from the annotation processor.
(cherry-picked from 4cb7d86aec)

Fixes gh-7882
8 years ago
Phillip Webb 732011987d Fix ManagementContextConfiguration @Order support
Update `ManagementContextConfigurationsImportSelector` to instantiate
classes so that order annotations are respected.

Fixes gh-7814
8 years ago
Phillip Webb 556ce14f2d Fix TestRestTemplate.withBasicAuth interceptors
Update `TestRestTemplate` to handle `BasicAuthorizationInterceptor`s
correctly. Prior to this commit the `BasicAuthorizationInterceptor`
was added directly to the `ClientHttpRequestFactory` rather than
to the `RestTemplate`. This meant that it could not easily be removed
when `TestRestTemplate.withBasicAuth` was invoked.

The `TestRestTemplate` now sets the interceptor on `RestTemplate`
directly and relies on the logic in `InterceptingHttpAccessor` to
add it to the `ClientHttpRequestFactory`.

Fixes gh-7812
8 years ago
Phillip Webb 9ccf47398e Formatting 8 years ago
Stephane Nicoll 7b494cf319 Polish
See gh-7793
8 years ago
Stephane Nicoll 1fa8b1ac91 Defend against lambda transaction customizers
Update `CacheManagerCustomizers` to deal directly with
`ClassCastException` assuming that they are because a customizer is
implemented using a lambda.

Closes gh-7788
8 years ago
Stephane Nicoll 1f5970c537 Fix auto-configuration class reference
Closes gh-7781
8 years ago
Phillip Webb 61c931943f Fix Devtools PatternResolver Servlet support
Update ClassLoaderFilesResourcePatternResolver to support servlet
resources when it's being used with a WebApplicationContext.

Prior to commit 918e122ddc a `ResourceLoader` was not added to the
`ApplicationContext`, meaning that servlet resources could be found by
virtue of the protected `getResourceByPath()` method. Following commit
918e122ddc, the context `ResourceLoader` is set, meaning that all calls
to `getResource` delegate to the `ResourceLoader` and the
`ApplicationContext` methods are not invoked. Since the devtools
`ResourceLoader` wasn't Servlet aware, servlet resources could not
be found.

Fixes gh-7752
8 years ago
Stephane Nicoll 3389af2c2f Fix build failure (II) 8 years ago