【发布时间】:2017-04-19 20:45:56
【问题描述】:
我有一个应用程序,我创建 bean A 来安排配置中定义的任务,但在测试中我想在每个测试类之前创建它 bean 并在每个类之后销毁。
我需要它,因为我更新了每个类中的属性,例如:
@TestPropertySource(properties = ["my.property=valueForTest"])
在 JUnit/Spring 中可以吗?
【问题讨论】:
标签: junit spring-boot spring-test