File tree Expand file tree Collapse file tree 9 files changed +46
-7
lines changed
api-boot-sample-logging-admin
java/org/minbox/framework/api/boot/sample/logging/admin
java/org/minbox/framework/api/boot/sample/logging Expand file tree Collapse file tree 9 files changed +46
-7
lines changed Original file line number Diff line number Diff line change 4949 <groupId>org.springframework.cloud</groupId>
5050 <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
5151 </dependency>-->
52+ <dependency >
53+ <groupId >com.alibaba.cloud</groupId >
54+ <artifactId >spring-cloud-starter-alibaba-nacos-discovery</artifactId >
55+ <version >2.2.1.RELEASE</version >
56+ </dependency >
5257 <dependency >
5358 <groupId >org.minbox.framework</groupId >
5459 <artifactId >api-boot-starter-mybatis-enhance</artifactId >
Original file line number Diff line number Diff line change 2222import org .slf4j .LoggerFactory ;
2323import org .springframework .boot .SpringApplication ;
2424import org .springframework .boot .autoconfigure .SpringBootApplication ;
25+ import org .springframework .cloud .client .discovery .EnableDiscoveryClient ;
2526
2627/**
2728 * @author:恒宇少年 - 于起宇
3435 */
3536@ SpringBootApplication
3637@ EnableLoggingAdmin
38+ @ EnableDiscoveryClient
3739public class ApiBootLoggingAdminApplication {
3840 /**
3941 * logger instance
Original file line number Diff line number Diff line change 1+ # Nacos config
2+ spring :
3+ cloud :
4+ nacos :
5+ discovery :
6+ server-addr : open.nacos.yuqiyu.com:80
Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ spring:
1111 username : root
1212 password : 123456
1313 url : jdbc:mysql://localhost:3306/test
14-
14+ profiles :
15+ active : discovery-nacos
1516server :
16- port : 9090
17+ port : 9091
1718
1819
1920api :
2324 # 显示上报日志
2425 show-console-report-log : true
2526 # 格式化上报日志
26- format-console-log-json : true
27+ format-console-log-json : true
Original file line number Diff line number Diff line change 5050 <groupId>org.springframework.cloud</groupId>
5151 <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
5252 </dependency>-->
53+ <dependency >
54+ <groupId >com.alibaba.cloud</groupId >
55+ <artifactId >spring-cloud-starter-alibaba-nacos-discovery</artifactId >
56+ <version >2.2.1.RELEASE</version >
57+ </dependency >
5358 </dependencies >
5459 <dependencyManagement >
5560 <dependencies >
Original file line number Diff line number Diff line change 2323import org .springframework .boot .SpringApplication ;
2424import org .springframework .boot .autoconfigure .SpringBootApplication ;
2525import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
26+ import org .springframework .cloud .client .discovery .EnableDiscoveryClient ;
2627import org .springframework .context .annotation .Bean ;
2728import org .springframework .web .client .RestTemplate ;
2829
3940 */
4041@ SpringBootApplication
4142@ EnableLoggingClient
43+ @ EnableDiscoveryClient
4244public class ApiBootLoggingApplication {
4345 /**
4446 * logger instance
Original file line number Diff line number Diff line change 22 boot :
33 logging :
44 admin :
5- server-address : user:123456@127.0.0.1 :9090
5+ server-address : user:123456@localhost :9090
66 format-console-log-json : true
7- number-of-request-log : 2
8- report-interval-second : 10
7+ # number-of-request-log: 2
8+ # report-interval-second: 10
Original file line number Diff line number Diff line change 1+ api :
2+ boot :
3+ logging :
4+ format-console-log-json : true
5+ number-of-request-log : 2
6+ discovery :
7+ service-id : api-boot-sample-logging-admin
8+ username : user
9+ password : 123456
10+ ignore-paths :
11+ - /actuator/health
12+
13+ # Nacos config
14+ spring :
15+ cloud :
16+ nacos :
17+ discovery :
18+ server-addr : open.nacos.yuqiyu.com:80
Original file line number Diff line number Diff line change 22 application :
33 name : api-boot-sample-logging
44 profiles :
5- active : appoint
5+ active : discovery-nacos
66server :
77 port : 8080
88
You can’t perform that action at this time.
0 commit comments