@ EnableTransactionManagement, @ ComponentScan and problems with DataSourceTransactionManager

In my application, I am using annotation based spring configuration.

I used @ComponentScan(and it worked fine). Now I am trying to add simple transaction management using @EnableTransactionManagement.

However, when I add it, I start to get errors if one of the beans is not found (i.e. I get BeanCreationExceptionbecause of NoSuchBeanDefinitionException). There is no other error (i.e. nothing related to transaction management).

When I comment @EnableTransactionManagement, everything works fine. I'm trying to use this withDataSourceTransactionManager

What could be the reason?

+4
source share
1 answer

, bean .

bean @Transactional, -, - JDK , .

- - bean (), .

, - , .

. fooobar.com/questions/246004/...

+3

Source: https://habr.com/ru/post/1502832/


All Articles