Commit Graph

8902 Commits

Author SHA1 Message Date
Phillip Webb 7396ccfe04 Harmonize ConditionOutcome messages
Add ConditionMessage class to help build condition messages in a
uniform format and update existing conditions to use it.

Fixes gh-6756
2016-09-07 10:50:39 -07:00
Phillip Webb 41dc53f5dd Polish 2016-09-07 08:34:45 -07:00
Dave Syer b5294a48b2 Use context class loader instead of one-off for command location
This works, and feels like the right thing to do, since there is no
guarantee that extensions won't in turn use ServiceLoader for things
that we haven't yet anticipated.

Fixes gh-6829. Cc @wilkinsona in case he has an opinion.
2016-09-07 10:00:34 +01:00
Stephane Nicoll b446505cef Fix escaping 2016-09-06 17:35:24 +02:00
Stephane Nicoll b803384348 Merge pull request #6817 from izeye:polish-20160905
* pr/6817:
  Polish
2016-09-05 09:08:28 +02:00
Johnny Lim 4b9f6869f0 Polish
Closes gh-6817
2016-09-05 09:08:08 +02:00
Stephane Nicoll b7da0bd301 Merge branch '1.3.x' 2016-09-05 09:00:52 +02:00
Stephane Nicoll 8a71ee0eff Merge pull request #6815 from vpavic:polish-javadoc
* pr/6815:
  Polish `HealthEndpoint` javadoc
2016-09-05 09:00:36 +02:00
Vedran Pavic b88889f020 Polish `HealthEndpoint` javadoc
Closes gh-6815
2016-09-05 09:00:08 +02:00
Stephane Nicoll 7e9aa92f5c Add reference to LDAP starter
See gh-2645
2016-09-04 22:56:36 +02:00
Stephane Nicoll 6f70d53285 Add documentation for `FailureAnalyzer`
Closes gh-6775
2016-09-02 13:11:50 +02:00
Andy Wilkinson 0e00a49dcc Prevent beans created with @MockBean from being post-processed
Post-processing of mocked beans causes a number of problems:

 - The mock may be proxied for asynchronous processing which can cause
   problems when configuring expectations on a mock (gh-6573)
 - The mock may be proxied so that its return values can be cached or
   so that its methods can be transactional. This causes problems with
   verification of the expected calls to a mock (gh-6573, gh-5837)
 - If the mock is created from a class that uses field injection, the
   container will attempt to inject values into its fields. This causes
   problems if the mock is being created to avoid the use of one of
   those dependencies (gh-6663)
 - Proxying a mocked bean can lead to a JDK proxy being created
   (if proxyTargetClass=false) as the mock implements a Mockito
   interface. This can then cause injection failures as the types don’t
   match (gh-6405, gh-6665)

All of these problems can be avoided if a mocked bean is not
post-processed. Avoiding post-processing prevents proxies from being
created and autowiring from being performed. This commit avoids
post-processing by registering mocked beans as singletons as well as
via a bean definition. The latter is still used by the context for type
matching purposes.

Closes gh-6573, gh-6663, gh-6664
2016-09-02 10:23:06 +02:00
Stephane Nicoll 52d7282f5e Auto-configure JdbcTemplate with DataJpaTest
This commit adds `JdbcTemplateAutoConfiguration` to the list of auto-
configurations that are applied with `DataJpaTest`. This effectively
allows to inject a `JdbcTemplate` in any `@DataJpaTest` test.

Closes gh-6802
2016-09-02 09:38:07 +02:00
Phillip Webb 65b4f61a35 Polish 2016-09-01 18:02:00 +01:00
Phillip Webb 951f051df9 Polish 2016-09-01 14:39:29 +01:00
Stephane Nicoll 08fbe87290 Fix ClassPathScanningCandidateComponentProvider init
Closes gh-6780
2016-09-01 14:23:17 +02:00
Andy Wilkinson 2e1988f97e Rework welcome page so that it only handles reqs that accept text/html
Closes gh-6668
2016-08-31 19:26:17 +01:00
Andy Wilkinson 1c294dd562 Deprecate DefaultProfileDocumentMatcher
Closes gh-6798
2016-08-31 17:00:45 +01:00
Andy Wilkinson 3a887151e6 Remove use of regular expressions in Spring profile-based doc matching
Closes gh-1309
2016-08-31 16:56:13 +01:00
Andy Wilkinson fff280470a Realign default compressable MIME types with Tomcat's defaults
Closes gh-3592
2016-08-31 14:57:06 +01:00
Andy Wilkinson 42f90d4554 Merge pull request #6399 from Eddú Meléndez
* gh-6399:
  Polish "Provide dependency management for Querydsl"
  Provide dependency management for Querydsl
2016-08-31 14:46:49 +01:00
Andy Wilkinson 27a32fbb96 Polish "Provide dependency management for Querydsl"
Closes gh-6399
2016-08-31 14:45:23 +01:00
Eddú Meléndez aa46af5591 Provide dependency management for Querydsl
Closes gh-6777
See gh-6399
2016-08-31 14:42:28 +01:00
Andy Wilkinson 3814e509a3 Polish @deprecated javadoc and link to replacements where available
Closes gh-6765
2016-08-31 14:34:49 +01:00
Andy Wilkinson d720645275 Polishing
Fix mistake introduced during forward merge
2016-08-31 14:06:37 +01:00
Andy Wilkinson 7841af50ef Merge branch '1.3.x' 2016-08-31 13:56:04 +01:00
Andy Wilkinson 20df899b7a Merge pull request #6759 from hengyunab
* gh-6759:
  Polish “Avoid null handler package in JarFile protocol handler registration”
  Avoid null handler package in JarFile protocol handler registration
2016-08-31 13:52:21 +01:00
Andy Wilkinson eb1c349f97 Polish “Avoid null handler package in JarFile protocol handler registration”
See gh-6759
2016-08-31 13:50:26 +01:00
Phillip Webb 2a22a7af12 Remove ApplicationInfo
Rework commit 4a69755b to remove the need for the ApplicationInfo class.
The updated code now uses the auto-configuration class to compute a
default persistence unit root location

Closes gh-6635
2016-08-31 14:49:15 +02:00
hengyunabc 33a81e87d1 Avoid null handler package in JarFile protocol handler registration
Closes gh-6759
2016-08-31 13:44:41 +01:00
Andy Wilkinson b488a3d9a3 Merge branch '1.3.x' 2016-08-31 13:30:39 +01:00
Andy Wilkinson 63b8e82c10 Update OnBeanCondition to consider hierarchy for PARENTS search strategy
Closes gh-6762
2016-08-31 13:28:08 +01:00
Andy Wilkinson 9874c22e23 Fix HAL browser endpoint redirect and entry point with custom servlet path
Previously, the HAL browser endpoint did not consider the dispatcher
servlet’s path (server.servlet-path) when redirecting to browser.html
or when updating the API entry point in the served HTML.

This commit moves to using ServletUriComponentsBuilder to build the URI
for the redirect and the path for the entry point. In the interests of
simplicity the logic that sometimes redirected and sometimes forwarded
the request has been changed so that it will always perform a redirect.

Closes gh-6586
2016-08-31 11:22:45 +01:00
Stephane Nicoll ff48a88b91 Enable fork more when devtools is present
This commit improves the run goal to automatically fork the process when
devtools is present and log a warning when fork has been disabled via
configuration since devtools will not work on a non-forked process.

We don't want devtools to kick in for integration tests so the logic has
been placed in `RunMojo` requiring a couple of protected methods to
override.

Closes gh-5137
2016-08-31 12:10:35 +02:00
Stephane Nicoll 7765d31edd Merge branch '1.3.x' 2016-08-31 10:47:54 +02:00
Stephane Nicoll c8632f12f6 Clarify scope of Guava's CacheLoader
Closes gh-6778
2016-08-31 10:47:41 +02:00
Stephane Nicoll f93775ec12 Clarify scope of Caffeine's CacheLoader
Closes gh-6770
2016-08-31 10:43:52 +02:00
Stephane Nicoll cf07d19ed4 Polish
See gh-6792
2016-08-31 09:27:50 +02:00
Stephane Nicoll b0face34f4 Upgrade to Spring AMQP 1.6.2.RELEASE
Closes gh-6788
2016-08-31 09:18:07 +02:00
Phillip Webb a985a5c861 Update @MockBean to support generics
Update @MockBean and @SpyBean to support field generics. Prior to this
commit the following fields would fail with a "Duplicate mock
definition" exception:

  @MockBean
  private IdentityProvider<PasswordIdentity> passwordIdentityProvider;

  @MockBean
  private IdentityProvider<Oauth2Identity> oauth2IdentityProvider;

Fixes gh-6602
2016-08-29 21:42:44 +01:00
Phillip Webb 565ad79856 Polish 2016-08-29 20:26:30 +01:00
Phillip Webb 850141c405 Merge branch '1.3.x' 2016-08-29 15:30:30 +01:00
Phillip Webb 69e96c6211 Polish 2016-08-29 15:29:54 +01:00
Stephane Nicoll c4cb831770 Polish 2016-08-28 11:02:19 +02:00
Stephane Nicoll afadac27bd Merge branch '1.3.x' 2016-08-27 12:34:05 +02:00
Stephane Nicoll 97f15d606d Auto-detect fork value in stop goal
So far, one has to set the "fork" value to both the start and stop
goals. Since they have the same name, sharing them in a global
configuration element does the trick. However, the plugin also supports
auto-detection of the fork value according to other parameters:
typically if an agent or jvm arguments are set, forking will be
automatically enabled. This is a problem since the stop goal is not aware
of that.

This commit transmits the value in a property attached to the
`MavenProject`. That way, the stop goal can retrieve that value and
apply the same defaults. This has the side effect that specifying the
fork value isn't necessary anymore.

Closes gh-6747
2016-08-27 12:33:44 +02:00
Andy Wilkinson cc53f8810a Correct deprecated ErrorPage javadoc's reference to its replacement
Closes gh-6764
2016-08-26 20:16:08 +01:00
Andy Wilkinson 55f6fb94ef Merge branch '1.3.x' 2016-08-26 17:32:50 +01:00
Andy Wilkinson a5c6b0954d Consider ancestors when finding primary beans for ConditionalOnSingleCandidate
Closes gh-6559
2016-08-26 17:29:47 +01:00
Andy Wilkinson 6df279d3a1 Merge branch '1.3.x' 2016-08-26 14:30:49 +01:00