Ver Fonte

禁用 content 的 actuator, 由于版本问题, mongodb 没有提供 actuator 相应的实现, 具体问题位于 DefaultMongoCommandTagsProvider 类

reghao há 9 meses atrás
pai
commit
b363fb83c1

+ 2 - 2
content/content-service/pom.xml

@@ -163,7 +163,7 @@
             <version>3.0.0</version>
         </dependency>
 
-        <dependency>
+        <!--<dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
@@ -174,7 +174,7 @@
         <dependency>
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-registry-prometheus</artifactId>
-        </dependency>
+        </dependency>-->
     </dependencies>
 
     <profiles>

+ 10 - 10
content/content-service/src/main/resources/application.yml

@@ -35,18 +35,18 @@ mybatis:
     map-underscore-to-camel-case: true
   mapper-locations: classpath*:mapper/**.xml
   type-aliases-package: cn.reghao.tnb.content.app.model.po
-management:
-  endpoints:
-    web:
-      base-path: /api/content/actuator
-      exposure:
-        include: "*"
-  metrics:
-    tags:
-      application: ${spring.application.name}
 eureka:
   instance:
     prefer-ip-address: true
   client:
     register-with-eureka: true
-    fetch-registry: true
+    fetch-registry: true
+#management:
+#  endpoints:
+#    web:
+#      base-path: /api/content/actuator
+#      exposure:
+#        include: "*"
+#  metrics:
+#    tags:
+#      application: ${spring.application.name}