Commit Graph

9307 Commits

Author SHA1 Message Date
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
2017-01-19 09:28:09 +00:00
Phillip Webb b28d537c78 Disable unwanted m2e activations
Add m2e activation properties to disable unwanted Eclipse facets.
2017-01-18 13:48:49 -08:00
Stephane Nicoll b242543545 Backport missing 3rd party starter reference 2017-01-18 16:34:11 +01:00
Stephane Nicoll b7d3e91e38 Merge pull request #8014 from larsgrefer:patch-1
* pr/8014:
  Add OkHttp starter reference
2017-01-18 16:25:20 +01:00
Lars Grefer f5d1b7807c Add OkHttp starter reference
Closes gh-8014
2017-01-18 16:24:23 +01:00
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.
2017-01-18 13:38:10 +00:00
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
2017-01-17 15:40:53 +00:00
Andy Wilkinson a02c2d4155 Improve the documentation of Health.Status constants
Closes gh-7784
2017-01-17 14:59:53 +00:00
Andy Wilkinson 9695e0a9d1 Document breakpoint config for remote debug tunnel and IntelliJ IDEA
Closes gh-7732
See gh-5047
2017-01-17 14:43:38 +00:00
Andy Wilkinson 0463350d2e Document that spring(Profile|Property) cannot be used with scan=true
Closes gh-5611
2017-01-17 14:23:43 +00:00
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
2017-01-17 10:30:47 +00:00
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
2017-01-16 20:42:04 +00:00
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
2017-01-16 11:47:14 +00:00
Stephane Nicoll dbee44a6b5 Merge pull request #7997 from slaskawi:ISPN-6561/Infinispan_starters
* pr/7997:
  Add Infinispan starter reference
2017-01-16 10:44:14 +01:00
Sebastian Laskawiec 16de86f917 Add Infinispan starter reference
Closes gh-7997
2017-01-16 10:43:44 +01:00
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
2017-01-16 04:00:20 -05:00
Andy Wilkinson 5158f6e5fc Test that double registration of ServletContextInitializers does not happen
Closes gh-4902
2017-01-16 03:59:53 -05:00
Karsten Sperling 600e74b6c9 Avoid double-reg when a Servlet or Filter implements ServletContextInitializer
See gh-4902
2017-01-16 03:59:53 -05:00
Stephane Nicoll c04fd325f1 Merge pull request #7993 from vpavic:gh-7944
* pr/7993:
  Document use of `OpenEntityManagerInViewInterceptor`
2017-01-16 09:45:58 +01:00
Vedran Pavic a7fce6b048 Document use of `OpenEntityManagerInViewInterceptor`
Closes gh-7993
2017-01-16 09:45:32 +01:00
Andy Wilkinson f92719c4be Remove unwanted override of git-commit-id-plugin's version 2017-01-13 18:58:19 -05:00
Andy Wilkinson d2201d5284 Correct copyright dates and enforce that starting year is 2012
Closes gh-7923
2017-01-13 18:43:30 -05:00
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
2017-01-13 15:30:09 -05:00
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
2017-01-13 15:15:58 -05:00
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
2017-01-13 07:28:57 -05:00
Andy Wilkinson 8b0ecab181 Add dependency management for spring-plugin-metadata
Closes gh-7864
2017-01-12 11:09:25 -05:00
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
2017-01-10 09:29:55 -05:00
drumonii bb5819b879 Fix configure a datasource reference doc link
Closes gh-7911
2017-01-10 09:29:35 -05:00
Andy Wilkinson bb4777c920 Merge pull request #7937 from Michael Simons
* gh-7937:
  Update springloaded version to 1.2.6.RELEASE in Maven-related docs
2017-01-10 09:13:20 -05:00
Michael J. Simons 3c291150d6 Update springloaded version to 1.2.6.RELEASE in Maven-related docs
Closes gh-7937
2017-01-10 09:13:00 -05:00
Andy Wilkinson 6a9397283c Merge pull request #7937 from Michael Simons
* gh-7937:
  Update springloaded version to 1.2.6.RELEASE in Gradle-related docs
2017-01-10 09:10:11 -05:00
Michael J. Simons ddca9a1687 Update springloaded version to 1.2.6.RELEASE in Gradle-related docs
Closes gh-7937
2017-01-10 09:08:35 -05:00
Stephane Nicoll 7c161b9920 Merge pull request #7907 from eddumelendez:fix_assertions
* pr/7907:
  Fix incomplete assertions
2017-01-08 09:13:24 +01:00
Eddú Meléndez f896ff9a10 Fix incomplete assertions
Closes gh-7907
2017-01-08 09:12:54 +01:00
Stephane Nicoll b9eda3f26b Document favicon support
Closes gh-7903
2017-01-08 09:04:53 +01:00
Phillip Webb 21bfe52694 Add test to check class resources aren't exposed
Closes gh-7880
2017-01-05 18:15:50 -08:00
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
2017-01-05 10:44:48 -08:00
Phillip Webb 732011987d Fix ManagementContextConfiguration @Order support
Update `ManagementContextConfigurationsImportSelector` to instantiate
classes so that order annotations are respected.

Fixes gh-7814
2017-01-03 15:12:35 -08:00
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
2017-01-03 15:12:30 -08:00
Phillip Webb 9ccf47398e Formatting 2016-12-30 10:56:44 -08:00
Stephane Nicoll 7b494cf319 Polish
See gh-7793
2016-12-30 15:59:17 +01:00
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
2016-12-30 14:19:03 +01:00
Stephane Nicoll 1f5970c537 Fix auto-configuration class reference
Closes gh-7781
2016-12-29 10:49:19 +01:00
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
2016-12-28 14:25:11 -08:00
Stephane Nicoll 3389af2c2f Fix build failure (II) 2016-12-28 12:08:55 +01:00
Stephane Nicoll 6ecb525a57 Fix build failure 2016-12-28 11:52:53 +01:00
Stephane Nicoll a862b6dc79 Polish documentation
Closes gh-7771
2016-12-28 10:14:22 +01:00
Phillip Webb d69364c00a Merge pull request #7741 from ArloL/fix-7701
* pr/7741:
  Notify BuildContext of changed build-info file
2016-12-27 13:32:51 -08:00
Arlo O'Keeffe 3a709511c4 Notify BuildContext of changed build-info file
Update Maven plugin to inform the BuildContext when changes are made to
the `build-info` file. Prior to this commit Eclipse could continually
trigger refreshes whenever "Refresh using native hooks or polling" was
enabled and the file was written to `src/main/resources`.

Closes gh-7741
2016-12-27 13:20:22 -08:00
Phillip Webb 8baac239c7 Merge pull request #7737 from mesutcang/master
* pr/7737:
  Improve Cassandra sample README documentation
2016-12-27 12:56:42 -08:00