I am using Groovy for my Spring application and I try to use multiple XML beans configurations inside my test. I tried using @ContextHierarchy
but following usage example didn't work:
@RunWith(SpringRunner)
@SpringBootTest
@ContextHierarchy({@ContextConfiguration("a.xml"), ContextConfiguration("b.xml")})
public class MyTest {
...
}
I have also tried:
@ContextConfiguration(locations={"a.xml", "b.xml"})
but it didn't work as well.
As I understand Groovy doesn't like the "{" "}", because it has different mean to it....?
How can I write the Testclass in groovy with two conifiguration xmls defined?