Spring 测试类的@ContextConfiguration和@Component
@ContextConfiguration(classes = xxxx.class),是不是xxxx类不用写@Component
也可以获取到xxxx类的bean啊,也就是说@ContextConfiguration有@Component的
作用啊
Jordan裔
2017/03/21 01:46- spring
- bean
- 点赞
- 收藏
- 回答
满意答案
@ContextConfiguration(classes = xxxx.class),是不是xxxx类不用写@Component
也可以获取到xxxx类的bean啊,也就是说@ContextConfiguration有@Component的
作用啊