Java Spring Boot 2.3.0迁移后,不再有可用的TransactionTemplate
我有一个非常简单的Spring Boot应用程序,只有一个依赖项:Java Spring Boot 2.3.0迁移后,不再有可用的TransactionTemplate,java,spring-boot,Java,Spring Boot,我有一个非常简单的Spring Boot应用程序,只有一个依赖项: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-activemq</artifactId> </dependency> 如何在Spring2.3.0中配置TransactionTemplate?在以前的版本中,这
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-activemq</artifactId>
</dependency>
如何在Spring2.3.0中配置TransactionTemplate?在以前的版本中,这是开箱即用的
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 1 of constructor in com.bookstore.shipping.service.ShippingService required a bean of type 'org.springframework.transaction.support.TransactionTemplate' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'transactionTemplate' in 'TransactionAutoConfiguration.TransactionTemplateConfiguration' not loaded because @ConditionalOnSingleCandidate (types: org.springframework.transaction.PlatformTransactionManager; SearchStrategy: all) did not find any beans
Action:
Consider revisiting the entries above or defining a bean of type 'org.springframework.transaction.support.TransactionTemplate' in your configuration.