apache / apache/incubator-seata
[分享] seata:1.5.2结合nacos:2.1.0,seata-spring-boot-starter:1.5.2,相关的配置
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
### nacos
图1

图2

图3

### 项目配置application.yml
```
# 完整配置: https://github.com/seata/seata/blob/develop/script/client/spring/application.yml
seata:
application-id: ${spring.application.name}
enable-auto-data-source-proxy: false
registry:
type: nacos
nacos:
server-addr: 192.168.0.143:8848
group: SEATA_GROUP
namespace: 02cf7241-260b-4d3b-ae1a-459bfc540007
username: nacos
password: nacos
application: seata-server # 注意这个,跟图3的服务名要一致的
config:
type: nacos
nacos:
server-addr: 192.168.0.143:8848
group: SEATA_GROUP
namespace: 02cf7241-260b-4d3b-ae1a-459bfc540007
username: nacos
password: nacos
tx-service-group: main_tx_group
```
感觉文档对于这些参数的解释不是很清楚(或者是我没好好的理解到文档?),经过调试代码,断点各种请求才最终成功!
FYI
nacos的主机防火墙,要同时开放8848,7848,9848,9849的端口,才能保证正常访问。
Contributor guide
Research direction
Start with script/client/spring/application.yml and compare its documented parameters with the posted application.yml, screenshots, and Nacos setup. Done means the relevant Seata/Nacos settings and required ports are explained clearly enough for users to reproduce the configuration without debugging through the code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100