spring cloud bus 了解下

This commit is contained in:
冷冷 2018-04-27 13:55:22 +08:00
parent c10f15d1eb
commit 60c6f34ce4
4 changed files with 32 additions and 8 deletions

View File

@ -102,7 +102,11 @@
<artifactId>transmittable-thread-local</artifactId>
<version>${ttl.version}</version>
</dependency>
<!--消息总线-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>
</dependencies>
<build>

View File

@ -23,6 +23,12 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<!--消息总线-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>
</dependencies>

View File

@ -10,11 +10,24 @@ spring:
config:
server:
git:
uri: https://gitee.com/cqzqxq_lxh/pig-config.git
uri: https://gitee.com/hsLeng/pig-config.git
default-label: ${spring.profiles.active} #解决监控down
# 关闭安全管理
management:
security:
enabled: false
endpoints:
health:
sensitive: false
---
spring:
profiles: dev
rabbitmq:
host: 139.224.200.249
port: 5682
username: pig
password: lengleng
eureka:
instance:
prefer-ip-address: true
@ -24,13 +37,14 @@ eureka:
serviceUrl:
defaultZone: http://pig:gip6666@localhost:1025/eureka
registry-fetch-interval-seconds: 10
endpoints:
health:
sensitive: false
---
spring:
profiles: prd
rabbitmq:
host: 139.224.200.249
port: 5682
username: pig
password: lengleng
cloud:
config:
retry:

View File

@ -94,11 +94,11 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
// 获取符合条件得菜单
List<MenuVO> all = findMenuByRole(roleName);
final List<MenuTree> menuTreeList = new ArrayList<>();
all.forEach((menuVo -> {
all.forEach(menuVo -> {
if (CommonConstant.MENU.equals(menuVo.getType())) {
menuTreeList.add(new MenuTree(menuVo));
}
}));
});
return TreeUtil.bulid(menuTreeList, -1);
}
}