阅读atomikos文档
This commit is contained in:
@@ -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
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user