Skip to content

Commit e9841e4

Browse files
xujinxujin
authored andcommitted
添加文档如何打开支持单nacos
1 parent f3db786 commit e9841e4

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,39 @@ spring:
271271
272272
-Xloggc:/opt/logs/gc.log -verbose.gc
273273
274+
### 4.1 切换支持单Nacos
275+
276+
将moss-service/pom.xml中的依赖修改如下
277+
278+
```xml
279+
<dependency>
280+
<groupId>org.xujin.moss</groupId>
281+
<artifactId>moss-adapter-multi-eureka</artifactId>
282+
<version>1.0.0.RELEASE</version>
283+
</dependency>
284+
```
285+
修改为
286+
```xml
287+
<dependency>
288+
<groupId>org.xujin.moss</groupId>
289+
<artifactId>moss-adapter-single-nacos</artifactId>
290+
<version>1.0.0.RELEASE</version>
291+
</dependency>
292+
```
293+
294+
主入口程序代码修改打开
295+
296+
```java
297+
/**
298+
* 单nacos或单eureka需要把@EnableDiscoveryClient注释打开
299+
*/
300+
@EnableDiscoveryClient
301+
@ComponentScan("org.xujin.moss.*")
302+
public class MossApplication {
303+
304+
}
305+
```
306+
274307

275308
## 5.致谢
276309

0 commit comments

Comments
 (0)