Skip to content

Commit

Permalink
feat(ms-init): 集成springboot admin #174
Browse files Browse the repository at this point in the history
  • Loading branch information
zhonghuasheng committed Dec 31, 2020
1 parent 2ec001b commit 4998a63
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 11 deletions.
11 changes: 0 additions & 11 deletions musicstore-springboot-vue/ms-platform/ms-business/ms-user/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,5 @@
<artifactId>ms-log-spring-boot-starter</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ spring:
server-addr: ${ms.nacos.host}
discovery:
server-addr: ${ms.nacos.host}
management:
endpoints:
web:
exposure:
include: '*'
endpoint:
health:
show-details: always
mybatis-plus:
type-aliases-package: com.zhonghuasheng.ms.model
logging:
Expand Down
10 changes: 10 additions & 0 deletions musicstore-springboot-vue/ms-platform/ms-business/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
<groupId>com.zhonghuasheng</groupId>
<artifactId>ms-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<modules>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
server:
port: 8888

# nacos是优先启动的,properties配置优先于yml,故我在config中配置了bootstrap.properties中。同时gateway的配置文件也改为比config的application-x
# 优先级高的bootstrap.yml否则,config中的application-x.properties优先启动,然而那里面没有配置nacos的信息,导致前面会报错
spring:
Expand All @@ -23,6 +24,14 @@ spring:
- Path=/api-user/** # 当请求的路径满足Path指定的规则时,才进行路由转发
filters: # 过滤器,请求在传递过程中可以通过过滤器对其进行一定的修改
- StripPrefix=1 # 转发之前去掉一层路径
management:
endpoints:
web:
exposure:
include: '*'
endpoint:
health:
show-details: always
logging:
file:
path: /var/logs/ms-platform/
11 changes: 11 additions & 0 deletions musicstore-springboot-vue/ms-platform/ms-monitor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,15 @@
<artifactId>ms-config</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-dependencies</artifactId>
<version>2.2.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ spring:
server-addr: ${ms.nacos.host}
config:
server-addr: ${ms.nacos.host}
management:
endpoints:
web:
exposure:
include: '*'
endpoint:
health:
show-details: always

0 comments on commit 4998a63

Please sign in to comment.