From 60c6f34ce48c226e8fc7ce38b84b5d2d95ab6853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= Date: Fri, 27 Apr 2018 13:55:22 +0800 Subject: [PATCH] =?UTF-8?q?spring=20cloud=20bus=20=E4=BA=86=E8=A7=A3?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pig-common/pom.xml | 6 ++++- pig-config/pom.xml | 6 +++++ pig-config/src/main/resources/bootstrap.yml | 24 +++++++++++++++---- .../service/impl/SysMenuServiceImpl.java | 4 ++-- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/pig-common/pom.xml b/pig-common/pom.xml index e47d52a0..f10d762f 100644 --- a/pig-common/pom.xml +++ b/pig-common/pom.xml @@ -102,7 +102,11 @@ transmittable-thread-local ${ttl.version} - + + + org.springframework.cloud + spring-cloud-starter-bus-amqp + diff --git a/pig-config/pom.xml b/pig-config/pom.xml index ae8f4699..89fbe4ff 100644 --- a/pig-config/pom.xml +++ b/pig-config/pom.xml @@ -23,6 +23,12 @@ org.springframework.cloud spring-cloud-config-server + + + + org.springframework.cloud + spring-cloud-starter-bus-amqp + diff --git a/pig-config/src/main/resources/bootstrap.yml b/pig-config/src/main/resources/bootstrap.yml index b7225c63..2260be04 100644 --- a/pig-config/src/main/resources/bootstrap.yml +++ b/pig-config/src/main/resources/bootstrap.yml @@ -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: diff --git a/pig-modules/pig-upms-service/src/main/java/com/github/pig/admin/service/impl/SysMenuServiceImpl.java b/pig-modules/pig-upms-service/src/main/java/com/github/pig/admin/service/impl/SysMenuServiceImpl.java index 5faa3c46..9fd7126b 100644 --- a/pig-modules/pig-upms-service/src/main/java/com/github/pig/admin/service/impl/SysMenuServiceImpl.java +++ b/pig-modules/pig-upms-service/src/main/java/com/github/pig/admin/service/impl/SysMenuServiceImpl.java @@ -94,11 +94,11 @@ public class SysMenuServiceImpl extends ServiceImpl impl // 获取符合条件得菜单 List all = findMenuByRole(roleName); final List 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); } }