阅读atomikos文档

This commit is contained in:
asahi
2024-04-07 23:18:16 +08:00
parent e37ec41b6e
commit 1772fde535

View File

@@ -110,3 +110,36 @@ public class AtomikosExample {
}
```
## Spring Boot集成TransactionsEssentials
### TransactionsEssentials 5.0及以上版本
如果要集成TransactionsEssentials 5.0及以上版本可以向pom中添加如下依赖
```xml
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-spring-boot-starter</artifactId>
</dependency>
```
### TransactionsEssentials 4.x
如果要集成4.x版本可以添加如下启动器该启动器为spring官方启动器
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
</dependency>
```
### 为atomikos指定日志级别
可以在properties中添加如下内容来指定atomikos的日志级别
```properties
logging.level.com.atomikos=DEBUG
```
### 在spring boot中配置atomikos属性
在spring boot中配置atomikos属性的示例如下所示
```yml
spring:
jta:
atomikos:
properties:
max-timeout: 900000
```