Skip to content

Commit

Permalink
Merge branch '2.3.x'
Browse files Browse the repository at this point in the history
Closes gh-22759
  • Loading branch information
wilkinsona committed Aug 6, 2020
2 parents 1864f47 + c121f9f commit 792c4f4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6680,6 +6680,9 @@ NOTE: While Spring's test framework caches application contexts between tests an
TIP: If you are using `@SpyBean` to spy on a bean with `@Cacheable` methods that refer to parameters by name, your application must be compiled with `-parameters`.
This ensures that the parameter names are available to the caching infrastructure once the bean has been spied upon.

TIP: When you are using `@SpyBean` to spy on a bean that is proxied by Spring, you may need to remove Spring's proxy in some situations, for example when setting expectations using `given` or `when`.
Use `AopTestUtils.getTargetProxy(yourProxiedSpy)` to do so.



[[boot-features-testing-spring-boot-applications-testing-autoconfigured-tests]]
Expand Down

0 comments on commit 792c4f4

Please sign in to comment.