AbstractTransactionalSpringContextTests为每个Test方法添加了事务功能,极大方便了测试。根据官方资料:
[b]AbstractTransactionalSpringContextTests[/b] depends on a [b]PlatformTransactionManager[/b] bean being defined
in the application context. The name doesn't matter, due to the use of autowire by type.
如果applicationContext中定义了两个或者多个PlatformTransactionManager,会发生什么?AbstractTransactionalSpringContextTests如何去选择采用哪中事务管理?
[b]AbstractTransactionalSpringContextTests[/b] depends on a [b]PlatformTransactionManager[/b] bean being defined
in the application context. The name doesn't matter, due to the use of autowire by type.
如果applicationContext中定义了两个或者多个PlatformTransactionManager,会发生什么?AbstractTransactionalSpringContextTests如何去选择采用哪中事务管理?