Skip to content

Commit

Permalink
增加 search 服务打包时的监控检查
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Aug 4, 2020
1 parent b83262a commit 7697c8b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
24 changes: 24 additions & 0 deletions search-service-project/search-service-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
<version>1.0-SNAPSHOT</version>
</dependency>

<!-- Web 相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <!-- 需要开启 Web 容器,因为 Actuator 需要使用到 -->
</dependency>

<!-- MQ 相关 -->
<dependency>
<groupId>cn.iocoder.mall</groupId>
Expand All @@ -64,6 +70,12 @@
<scope>test</scope>
</dependency>

<!-- 监控相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<!-- 工具类相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -91,4 +103,16 @@
</dependency>
</dependencies>

<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<!-- 使用 spring-boot-maven-plugin 插件打包 -->
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ dubbo:
rocketmq:
name-server: 400-infra.server.iocoder.cn:9876

# Actuator 监控配置项
management:
server.port: 38083 # 独立端口,避免被暴露出去
endpoints.web.exposure.include: '*' # 暴露所有监控端点
server.port: ${management.server.port} # 设置使用 Actuator 的服务器端口,因为 RPC 服务不需要 Web 端口

# Mall 配置项
mall:
# 错误码配置项对应 ErrorCodeProperties 配置类
Expand Down

0 comments on commit 7697c8b

Please sign in to comment.