spring-boot - 如何查看我的 Spring Boot 应用程序中是否启用了事务管理?

标签 spring-boot spring-data spring-transactions

我想看看我的应用程序(使用 spring boot 编写的)是否启用了事务管理。

我怎样才能以编程方式和通过代码检查(注释等)来做到这一点?

最佳答案

手动或以编程方式(使用 AnnotationUtils)在您的应用程序中查找 EnableTransactionManagement 注释。

或者打开事务跟踪:

logging.level.org.springframework.transaction.interceptor=TRACE

另见 this post

关于spring-boot - 如何查看我的 Spring Boot 应用程序中是否启用了事务管理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42713602/

相关文章:

java - Spring boot项目创建Bean'entityManagerFactory时出现Application Run Failed错误;

java - Heroku 保存时请求超时代码 H12

java - Spring 查询在整个对象上不同

spring - 如果在运行 spring boot 应用程序时不存在 Postgres 数据库,则创建它

java - 为什么我的@RestController 中接收到的实体将值设置为 null 而不是默认值

spring - 当服务器启动时,如何在 Spring Boot 中启动服务?

java - 如何仅在之前未加载 bean 的情况下创建 bean 定义?

java - Spring Batch 中如何维护数据库连接和事务

java - 如何让两个相同的读+写并发事务相互等待?

java - Spring Boot @Transactional 和 @RestController