1. 05 Sep, 2016 4 commits
  2. 04 Sep, 2016 1 commit
  3. 02 Sep, 2016 3 commits
    • Stephane Nicoll's avatar
      Add documentation for `FailureAnalyzer` · 6f70d532
      Stephane Nicoll authored
      Closes gh-6775
      6f70d532
    • Andy Wilkinson's avatar
      Prevent beans created with @MockBean from being post-processed · 0e00a49d
      Andy Wilkinson authored
      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
      0e00a49d
    • Stephane Nicoll's avatar
      Auto-configure JdbcTemplate with DataJpaTest · 52d7282f
      Stephane Nicoll authored
      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
      52d7282f
  4. 01 Sep, 2016 3 commits
  5. 31 Aug, 2016 23 commits
  6. 29 Aug, 2016 4 commits
    • Phillip Webb's avatar
      Update @MockBean to support generics · a985a5c8
      Phillip Webb authored
      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
      a985a5c8
    • Phillip Webb's avatar
      Polish · 565ad798
      Phillip Webb authored
      565ad798
    • Phillip Webb's avatar
      Merge branch '1.3.x' · 850141c4
      Phillip Webb authored
      850141c4
    • Phillip Webb's avatar
      Polish · 69e96c62
      Phillip Webb authored
      69e96c62
  7. 28 Aug, 2016 1 commit
  8. 27 Aug, 2016 1 commit