spring boot:"无法打开JPA EntityManager进行事务处理;

时间:2015-01-22 09:28:10

标签: java spring jpa spring-boot

完整的例外是:“

Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: Already value [org.springframework.jdbc.datasource.ConnectionHolder@1847d2b9] for key [org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactory$EmbeddedDataSourceProxy@2d4.

我是春季靴子的新手,我在我的服务课上使用@Transactional

@Service
@Transactional
public class OperationActivitySettingService extends AbstractService {}

这是我的配置

@Configuration
@ComponentScan(basePackages = "com.dp.*")
@EnableAutoConfiguration
@EnableJpaRepositories
@EnableTransactionManagement

但是,当我启动tomcat并使用我的服务时,将抛出异常,如上所述。

0 个答案:

没有答案