File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed
moss-web/src/main/java/org/xujin/moss Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -291,20 +291,17 @@ spring:
291
291
</dependency >
292
292
```
293
293
294
- 主入口程序代码修改打开
295
-
296
- ``` java
297
- /**
298
- * 单nacos或单eureka需要把@EnableDiscoveryClient注释打开
299
- */
300
- @EnableDiscoveryClient
301
- @ComponentScan (" org.xujin.moss.*" )
302
- public class MossApplication {
303
-
304
- }
294
+ yml文件配置如下
295
+ ``` yml
296
+ spring :
297
+ application :
298
+ name : halo-moss
299
+ cloud :
300
+ nacos :
301
+ discovery :
302
+ server-addr : 127.0.0.1:8848
305
303
` ` `
306
304
307
-
308
305
## 5.致谢
309
306
310
307
Moss中的moss-adapter-cloud和moss-core模块部分代码参考了 [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin),感谢 Codecentric 开源了该框架。
Original file line number Diff line number Diff line change 1
1
package org .xujin .moss ;
2
2
3
- import com .ulisesbocchio .jasyptspringboot .encryptor .DefaultLazyEncryptor ;
4
- import com .ulisesbocchio .jasyptspringboot .encryptor .SimplePBEStringEncryptor ;
5
3
import de .codecentric .boot .admin .server .config .EnableAdminServer ;
6
- import org .jasypt .encryption .StringEncryptor ;
7
- import org .springframework .beans .factory .annotation .Autowired ;
8
4
import org .springframework .boot .SpringApplication ;
9
5
import org .springframework .boot .autoconfigure .EnableAutoConfiguration ;
10
6
import org .springframework .boot .web .server .ConfigurableWebServerFactory ;
26
22
@ EnableAutoConfiguration
27
23
@ EnableAdminServer
28
24
//@EnableScheduling
29
- /**
30
- * 单nacos或单eureka需要把@EnableDiscoveryClient注释打开
31
- */
32
- //@EnableDiscoveryClient
25
+ @ EnableDiscoveryClient
33
26
@ ComponentScan ("org.xujin.moss.*" )
34
27
public class MossApplication {
35
28
You can’t perform that action at this time.
0 commit comments