"In the TestContext framework, transactions are managed by the
TransactionalTestExecutionListener which is configured by default, even if you do not
explicitly declare @TestExecutionListeners on your test class. To enable support for
transactions, however, you must configure a PlatformTransactionManager bean in the
ApplicationContext that is loaded via @ContextConfiguration semantics (further
details are provided below). In addition, you must declare Spring’s @Transactional
annotation either at the class or method level for your tests." - http://docs.spring.io/spring/docs/4.2.5.RELEASE/spring-framework-reference/html/integration-testing.html#testcontext-tx
No comments:
Post a Comment