Align precedence of @SpringBootTest properties with @TestPropertySource

This commit updates the precedence of properties configured using
@SpringBootTest to align with @TestPropertySource. Properties configured
using properties on @SpringBootTest are now added to the same property
source as those configured using properties on @TestPropertySource so
the precedence described in the javadoc of @TestPropertySource now
applies in full. Additionally, if both @TestPropertySource properties
and @SpringBootTest properties configure the same property, the value
from @TestPropertySource will win.

Closes gh-4828
This commit is contained in:
Andy Wilkinson
2016-04-07 10:40:55 +01:00
parent 5f5db1703c
commit 69b0829199
5 changed files with 137 additions and 114 deletions

View File

@@ -1 +1,3 @@
annotation-referenced=fromfile
property-source-location=baz
a=property-source-location
b=property-source-location