阅读背景:

Spring JUnit:如何在自动装配的组件中模拟自动装配的组件

来源:互联网 

I've got a Spring component I'd like to test and this component has an autowired attribute which I need to change for the purpose of unit testing. The problem is, that the class uses the autowired component inside the post-construct method so I'm not able to replace it(i.e. via ReflectionTestUtils) before it's actually used. I've got a Spring component I'd like to test an




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: