【发布时间】:2018-08-24 14:32:46
【问题描述】:
我目前正在定义我的基本规范如下:
@Configuration
@ActiveProfiles(profiles = "test")
@ContextConfiguration(locations = "classpath:test-config-context.xml" )
class SpringSharedSpecification extends Specification
这也最终会处理我的父 application-context.xml
我正在使用活动配置文件选项来不加载主 bean 并使用 test-config 执行 我在下面使用跳过应用程序上下文 bean,但不认为这是最好的方法。谁能建议跳过 application-context.xml 的更好方法?
<beans profile="!test">
提前感谢您的回答。
【问题讨论】:
标签: spring unit-testing spring-boot javabeans spock