1.添加公众号关注、取关消费者
Showing
12 changed files
with
262 additions
and
484 deletions
... | @@ -16,6 +16,35 @@ import org.springframework.context.annotation.Primary; | ... | @@ -16,6 +16,35 @@ import org.springframework.context.annotation.Primary; |
16 | @Configuration | 16 | @Configuration |
17 | public class RabbitMqConfig { | 17 | public class RabbitMqConfig { |
18 | 18 | ||
19 | |||
20 | //////////////////////////////////////////////////////// OMO 小屏/////////////////////////////////////////////////////////////// | ||
21 | |||
22 | /** 获取带参二维码(大屏->小屏) */ | ||
23 | public static final String GET_QR_CODE_QUEUE = "queue.qrCode.get"; | ||
24 | |||
25 | /** 删除全部收藏队列(大屏->小屏) */ | ||
26 | public static final String COLLECTION_DELETE_ALL_QUEUE = "queue.collection.deleteall"; | ||
27 | |||
28 | /** 添加收藏队列(大屏->小屏) */ | ||
29 | public static final String COLLECTION_ADD_QUEUE = "queue.collection.add"; | ||
30 | |||
31 | /** 删除收藏队列(大屏->小屏) */ | ||
32 | public static final String COLLECTION_DELETE_QUEUE = "queue.collection.delete"; | ||
33 | |||
34 | /** 微信侧 公众号关注与取消关注 */ | ||
35 | public static final String WEIXIN_SUBORUNSUB_QUEUE = "weixin.subOrUnSub.queue"; | ||
36 | |||
37 | |||
38 | |||
39 | |||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
45 | |||
46 | //////////////////////////////////////////////////////// 重数 /////////////////////////////////////////////////////////////// | ||
47 | |||
19 | /** 路由(事件)--direct route.key*/ | 48 | /** 路由(事件)--direct route.key*/ |
20 | // 事件,uc-gateway | 49 | // 事件,uc-gateway |
21 | public static final String UC_ROUTE_KEY_DIRECT_EVENT_AAA = "uc.route.key.direct.event.aaa"; | 50 | public static final String UC_ROUTE_KEY_DIRECT_EVENT_AAA = "uc.route.key.direct.event.aaa"; |
... | @@ -123,4 +152,6 @@ public class RabbitMqConfig { | ... | @@ -123,4 +152,6 @@ public class RabbitMqConfig { |
123 | public Queue eventDirect() { | 152 | public Queue eventDirect() { |
124 | return new Queue(UC_ROUTE_KEY_DIRECT_EVENT_AAA); | 153 | return new Queue(UC_ROUTE_KEY_DIRECT_EVENT_AAA); |
125 | } | 154 | } |
155 | |||
156 | |||
126 | } | 157 | } | ... | ... |
1 | package com.topdraw.mq.consumer; | ||
2 | |||
3 | import lombok.extern.slf4j.Slf4j; | ||
4 | import org.slf4j.Logger; | ||
5 | import org.slf4j.LoggerFactory; | ||
6 | import org.springframework.beans.factory.annotation.Autowired; | ||
7 | import org.springframework.stereotype.Component; | ||
8 | |||
9 | @Component | ||
10 | @Slf4j | ||
11 | public class UcEngineEventConsumer { | ||
12 | |||
13 | private static final Logger LOG = LoggerFactory.getLogger(UcEngineEventConsumer.class); | ||
14 | |||
15 | @Autowired | ||
16 | AutoRoute autoUser; | ||
17 | |||
18 | |||
19 | } |
1 | package com.topdraw.mq.consumer; | ||
2 | |||
3 | import com.topdraw.config.RabbitMqConfig; | ||
4 | import com.topdraw.mq.domain.TableOperationMsg; | ||
5 | import com.topdraw.util.JSONUtil; | ||
6 | import lombok.extern.slf4j.Slf4j; | ||
7 | import org.slf4j.Logger; | ||
8 | import org.slf4j.LoggerFactory; | ||
9 | import org.springframework.amqp.core.ExchangeTypes; | ||
10 | import org.springframework.amqp.rabbit.annotation.*; | ||
11 | import org.springframework.beans.factory.annotation.Autowired; | ||
12 | import org.springframework.stereotype.Component; | ||
13 | |||
14 | @Component | ||
15 | @Slf4j | ||
16 | public class UcEngineManageConsumer { | ||
17 | |||
18 | private static final Logger LOG = LoggerFactory.getLogger(UcEngineManageConsumer.class); | ||
19 | |||
20 | @Autowired | ||
21 | AutoRoute autoUser; | ||
22 | |||
23 | /** | ||
24 | * @param content | ||
25 | * @description 基础数据同步 | ||
26 | * @author Hongyan Wang | ||
27 | * @date 2021/9/7 11:26 上午 | ||
28 | */ | ||
29 | /*@RabbitHandler | ||
30 | @RabbitListener(bindings = { | ||
31 | @QueueBinding(value = @Queue(value = RabbitMqConfig.UC_ROUTE_KEY_DIRECT_EVENT_CCC), | ||
32 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) | ||
33 | }, containerFactory = "managementRabbitListenerContainerFactory") | ||
34 | public void memberServiceFanoutConsumer(String content) { | ||
35 | try { | ||
36 | log.info(" receive dataSync msg , content is : {} ", content); | ||
37 | TableOperationMsg dataSyncMsg = JSONUtil.parseMsg2Object(content, TableOperationMsg.class); | ||
38 | autoUser.route(dataSyncMsg); | ||
39 | LOG.info("memberServiceFanoutConsumer ====>>>> "+dataSyncMsg); | ||
40 | } catch (Exception e) { | ||
41 | log.error(" LocalDataSyncMsg || msg:{} || error:{} ", content, e.getMessage()); | ||
42 | } | ||
43 | }*/ | ||
44 | } |
1 | package com.topdraw.mq.consumer; | ||
2 | |||
3 | import com.topdraw.config.RabbitMqConfig; | ||
4 | import com.topdraw.mq.domain.TableOperationMsg; | ||
5 | import com.topdraw.resttemplate.RestTemplateClient; | ||
6 | import com.topdraw.util.JSONUtil; | ||
7 | import lombok.extern.slf4j.Slf4j; | ||
8 | import org.springframework.amqp.core.ExchangeTypes; | ||
9 | import org.springframework.amqp.rabbit.annotation.*; | ||
10 | import org.springframework.beans.factory.annotation.Autowired; | ||
11 | import org.springframework.stereotype.Component; | ||
12 | |||
13 | @Component | ||
14 | @Slf4j | ||
15 | public class UcEngineServiceConsumer { | ||
16 | |||
17 | @Autowired | ||
18 | RestTemplateClient restTemplateClient; | ||
19 | |||
20 | @Autowired | ||
21 | AutoRoute autoUser; | ||
22 | |||
23 | /** | ||
24 | * 事件 | ||
25 | * @param content | ||
26 | * @description 基础数据同步 | ||
27 | * @author Hongyan Wang | ||
28 | * @date 2021/9/7 11:26 上午 | ||
29 | */ | ||
30 | @RabbitHandler | ||
31 | @RabbitListener(bindings = { | ||
32 | @QueueBinding(value = @Queue(value = RabbitMqConfig.UC_ROUTE_KEY_DIRECT_EVENT_BBB), | ||
33 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) | ||
34 | }, containerFactory = "serviceRabbitListenerContainerFactory") | ||
35 | public void ucEventConsumer(String content) { | ||
36 | log.info(" receive dataSync msg , content is : {} ", content); | ||
37 | TableOperationMsg dataSyncMsg = JSONUtil.parseMsg2Object(content, TableOperationMsg.class); | ||
38 | autoUser.route(dataSyncMsg); | ||
39 | log.info("ucEventConsumer ====>>>> end"); | ||
40 | } | ||
41 | |||
42 | } |
... | @@ -13,7 +13,7 @@ import org.springframework.util.Assert; | ... | @@ -13,7 +13,7 @@ import org.springframework.util.Assert; |
13 | 13 | ||
14 | @Component | 14 | @Component |
15 | @Slf4j | 15 | @Slf4j |
16 | public class UcGatewayConsumer { | 16 | public class UcGatewayEventConsumer { |
17 | 17 | ||
18 | @Autowired | 18 | @Autowired |
19 | RestTemplateClient restTemplateClient; | 19 | RestTemplateClient restTemplateClient; |
... | @@ -28,7 +28,7 @@ public class UcGatewayConsumer { | ... | @@ -28,7 +28,7 @@ public class UcGatewayConsumer { |
28 | * @author Hongyan Wang | 28 | * @author Hongyan Wang |
29 | * @date 2021/9/7 11:26 上午 | 29 | * @date 2021/9/7 11:26 上午 |
30 | */ | 30 | */ |
31 | /*@RabbitHandler | 31 | @RabbitHandler |
32 | @RabbitListener(bindings = { | 32 | @RabbitListener(bindings = { |
33 | @QueueBinding(value = @Queue(value = RabbitMqConfig.UC_ROUTE_KEY_DIRECT_EVENT_AAA), | 33 | @QueueBinding(value = @Queue(value = RabbitMqConfig.UC_ROUTE_KEY_DIRECT_EVENT_AAA), |
34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) | 34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) |
... | @@ -38,7 +38,7 @@ public class UcGatewayConsumer { | ... | @@ -38,7 +38,7 @@ public class UcGatewayConsumer { |
38 | DataSyncMsg dataSyncMsg = this.parseContent(content); | 38 | DataSyncMsg dataSyncMsg = this.parseContent(content); |
39 | this.taskDeal(dataSyncMsg); | 39 | this.taskDeal(dataSyncMsg); |
40 | log.info("ucEventConsumer ====>>>> end"); | 40 | log.info("ucEventConsumer ====>>>> end"); |
41 | }*/ | 41 | } |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * 数据解析 | 44 | * 数据解析 | ... | ... |
This diff is collapsed.
Click to expand it.
1 | package com.topdraw.mq.domain; | ||
2 | |||
3 | import lombok.AllArgsConstructor; | ||
4 | import lombok.Data; | ||
5 | import lombok.NoArgsConstructor; | ||
6 | |||
7 | @Data | ||
8 | @AllArgsConstructor | ||
9 | @NoArgsConstructor | ||
10 | public class SubscribeBean { | ||
11 | |||
12 | /** */ | ||
13 | private String openId; | ||
14 | |||
15 | /** */ | ||
16 | private String appId; | ||
17 | |||
18 | /** */ | ||
19 | private String eventKey; | ||
20 | |||
21 | } |
... | @@ -6,6 +6,7 @@ import com.topdraw.business.basicdata.member.address.domain.MemberAddress; | ... | @@ -6,6 +6,7 @@ import com.topdraw.business.basicdata.member.address.domain.MemberAddress; |
6 | import com.topdraw.business.basicdata.member.domain.Member; | 6 | import com.topdraw.business.basicdata.member.domain.Member; |
7 | import com.topdraw.business.basicdata.member.relatedinfo.domain.MemberRelatedInfo; | 7 | import com.topdraw.business.basicdata.member.relatedinfo.domain.MemberRelatedInfo; |
8 | import com.topdraw.mq.domain.DataSyncMsg; | 8 | import com.topdraw.mq.domain.DataSyncMsg; |
9 | import com.topdraw.mq.domain.SubscribeBean; | ||
9 | import lombok.extern.slf4j.Slf4j; | 10 | import lombok.extern.slf4j.Slf4j; |
10 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
11 | import org.springframework.core.env.Environment; | 12 | import org.springframework.core.env.Environment; |
... | @@ -41,7 +42,6 @@ public class RestTemplateClient { | ... | @@ -41,7 +42,6 @@ public class RestTemplateClient { |
41 | } | 42 | } |
42 | 43 | ||
43 | public JSONObject dealTask(DataSyncMsg dataSyncMsg) { | 44 | public JSONObject dealTask(DataSyncMsg dataSyncMsg) { |
44 | JSONObject resultSet = null; | ||
45 | String url = BASE_URL + "/api/TaskOperation/dealTask"; | 45 | String url = BASE_URL + "/api/TaskOperation/dealTask"; |
46 | log.info("request uc : url is " + url + ", dataSyncMsg is " + dataSyncMsg); | 46 | log.info("request uc : url is " + url + ", dataSyncMsg is " + dataSyncMsg); |
47 | String content = JSON.toJSONString(dataSyncMsg); | 47 | String content = JSON.toJSONString(dataSyncMsg); |
... | @@ -78,122 +78,96 @@ public class RestTemplateClient { | ... | @@ -78,122 +78,96 @@ public class RestTemplateClient { |
78 | return resultSet; | 78 | return resultSet; |
79 | } | 79 | } |
80 | 80 | ||
81 | public String createMember(Member member) { | 81 | public String createMemberAddress(MemberAddress member) { |
82 | String entityBody = ""; | 82 | String url = BASE_URL + "/api/MemberAddress/create"; |
83 | String url = BASE_URL + "/api/member/create"; | ||
84 | log.info("request uc : url is " + url + ", memberId is " + JSONObject.toJSONString(member)); | 83 | log.info("request uc : url is " + url + ", memberId is " + JSONObject.toJSONString(member)); |
85 | ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, member, String.class); | 84 | restTemplate.postForEntity(url, member, String.class); |
85 | /* ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, member, String.class); | ||
86 | String entityBody = ""; | ||
86 | if (responseEntity.getStatusCode().is2xxSuccessful()) { | 87 | if (responseEntity.getStatusCode().is2xxSuccessful()) { |
87 | entityBody = responseEntity.getBody(); | 88 | entityBody = responseEntity.getBody(); |
88 | |||
89 | } | 89 | } |
90 | return entityBody; | 90 | log.info("uc response: " + entityBody);*/ |
91 | return null; | ||
91 | } | 92 | } |
92 | 93 | ||
93 | public String updateMember(Member member) { | 94 | public String unsubscribe(SubscribeBean subscribeBean) { |
94 | String entityBody = ""; | 95 | String url = BASE_URL + "/ucEngine/api/userOperation/unsubscribe"; |
95 | String url = BASE_URL + "/api/member/update"; | 96 | String content = JSON.toJSONString(subscribeBean); |
96 | log.info("request uc : url is " + url + ", memberId is " + JSONObject.toJSONString(member)); | ||
97 | restTemplate.put(url, member); | ||
98 | |||
99 | return entityBody; | ||
100 | } | ||
101 | 97 | ||
102 | public String createMemberAddress(MemberAddress member) { | 98 | HashMap<Object, Object> objectObjectHashMap = new HashMap<>(); |
103 | JSONObject resultSet = null; | 99 | objectObjectHashMap.put("content", content); |
104 | String url = BASE_URL + "/api/MemberAddress/create"; | 100 | restTemplate.postForEntity(url, objectObjectHashMap, String.class); |
105 | log.info("request uc : url is " + url + ", memberId is " + JSONObject.toJSONString(member)); | 101 | /*ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, subscribeBean, String.class); |
106 | ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, member, String.class); | ||
107 | String entityBody = ""; | 102 | String entityBody = ""; |
108 | if (responseEntity.getStatusCode().is2xxSuccessful()) { | 103 | if (responseEntity.getStatusCode().is2xxSuccessful()) { |
109 | entityBody = responseEntity.getBody(); | 104 | entityBody = responseEntity.getBody(); |
110 | } | 105 | } |
111 | log.info("uc response: " + entityBody); | 106 | log.info("uc response: " + entityBody);*/ |
112 | return entityBody; | 107 | return null; |
113 | } | 108 | } |
114 | 109 | ||
115 | public void updateMemberAddress(MemberAddress member) { | 110 | public String subscribe(SubscribeBean subscribeBean) { |
116 | String url = BASE_URL + "/api/MemberAddress/update"; | 111 | String url = BASE_URL + "/ucEngine/api/userOperation/subscribe"; |
117 | log.info("request uc : url is " + url + ", memberId is " + JSONObject.toJSONString(member)); | 112 | String content = JSON.toJSONString(subscribeBean); |
118 | restTemplate.put(url, member); | ||
119 | 113 | ||
114 | HashMap<Object, Object> objectObjectHashMap = new HashMap<>(); | ||
115 | objectObjectHashMap.put("content", content); | ||
116 | restTemplate.postForEntity(url, objectObjectHashMap, String.class); | ||
117 | /*ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, subscribeBean, String.class); | ||
118 | String entityBody = ""; | ||
119 | if (responseEntity.getStatusCode().is2xxSuccessful()) { | ||
120 | entityBody = responseEntity.getBody(); | ||
120 | } | 121 | } |
121 | 122 | log.info("uc response: " + entityBody);*/ | |
122 | public void deleteMemberAddress(Long id) { | 123 | return null; |
123 | String url = BASE_URL + "/api/MemberAddress/delete/" + id; | ||
124 | log.info("request uc : url is " + url + ", memberId is " + id); | ||
125 | restTemplate.delete(url); | ||
126 | |||
127 | } | 124 | } |
128 | 125 | ||
129 | public JSONObject getMemberProfile(Long memberId) { | 126 | public String sendQrCodeMessage(String content) { |
130 | JSONObject resultSet = null; | 127 | String url = BASE_URL + "/ucEngine/api/userOperation/sendQrCodeMessage"; |
131 | String url = BASE_URL + "/api/MemberRelatedInfo/getMemberRelatedInfos"; | 128 | restTemplate.postForEntity(url, content, String.class); |
132 | log.info("request uc : url is " + url + ", memberId is " + memberId); | 129 | /* ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, content, String.class); |
133 | ResponseEntity<String> responseEntity = restTemplate.getForEntity(url, String.class); | 130 | String entityBody = ""; |
134 | if (responseEntity.getStatusCode().is2xxSuccessful()) { | 131 | if (responseEntity.getStatusCode().is2xxSuccessful()) { |
135 | String entityBody = responseEntity.getBody(); | 132 | entityBody = responseEntity.getBody(); |
136 | JSONObject jsonObject = JSONObject.parseObject(entityBody); | ||
137 | if (jsonObject.getInteger("businessCode").equals(200)) { | ||
138 | resultSet = jsonObject.getJSONArray("resultSet").getJSONObject(0); | ||
139 | } | ||
140 | } | 133 | } |
141 | log.info("uc response: " + resultSet.toJSONString()); | 134 | log.info("uc response: " + entityBody);*/ |
142 | return resultSet; | 135 | return null; |
143 | } | 136 | } |
144 | 137 | ||
145 | public String getMemberAddress(Map<String, Object> param) { | 138 | public String addCollection(String content) { |
139 | String url = BASE_URL + "/ucEngine/api/userOperation/addCollection"; | ||
140 | restTemplate.postForEntity(url, content, String.class); | ||
141 | /* ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, content, String.class); | ||
146 | String entityBody = ""; | 142 | String entityBody = ""; |
147 | String url = BASE_URL + "/api/MemberAddress/pageMemberAddress?page=" + param.get("page") + "&size=" + param.get("size") + "&memberId=" + param.get("memberId"); | ||
148 | log.info("request uc : url is " + url + ", param is " + param); | ||
149 | ResponseEntity<String> responseEntity = restTemplate.getForEntity(url, String.class); | ||
150 | if (responseEntity.getStatusCode().is2xxSuccessful()) { | 143 | if (responseEntity.getStatusCode().is2xxSuccessful()) { |
151 | entityBody = responseEntity.getBody(); | 144 | entityBody = responseEntity.getBody(); |
152 | } | 145 | } |
153 | log.info("uc response: " + entityBody); | 146 | log.info("uc response: " + entityBody);*/ |
154 | return entityBody; | 147 | return null; |
155 | } | 148 | } |
156 | 149 | ||
157 | public String getMemberRelatedInfo(Map<String, Object> param) { | 150 | public String deleteCollection(String content) { |
151 | String url = BASE_URL + "/ucEngine/api/userOperation/deleteCollection"; | ||
152 | restTemplate.postForEntity(url, content, String.class); | ||
153 | /* ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, content, String.class); | ||
158 | String entityBody = ""; | 154 | String entityBody = ""; |
159 | String url = BASE_URL + "/api/MemberRelatedInfo/pageMemberRelatedInfos?page=" + param.get("page") + "&size=" + param.get("size") + "&memberId=" + param.get("memberId"); | ||
160 | log.info("request uc : url is " + url + ", memberId is " + param); | ||
161 | ResponseEntity<String> responseEntity = restTemplate.getForEntity(url, String.class); | ||
162 | if (responseEntity.getStatusCode().is2xxSuccessful()) { | 155 | if (responseEntity.getStatusCode().is2xxSuccessful()) { |
163 | entityBody = responseEntity.getBody(); | 156 | entityBody = responseEntity.getBody(); |
164 | } | 157 | } |
165 | log.info("uc response: " + entityBody); | 158 | log.info("uc response: " + entityBody);*/ |
166 | return entityBody; | 159 | return null; |
167 | } | ||
168 | |||
169 | public void deleteMemberRelatedInfo(Long memberRelatedId) { | ||
170 | String url = BASE_URL + "/api/MemberRelatedInfo/delete/" + memberRelatedId; | ||
171 | log.info("request uc : url is " + url + ", memberId is " + memberRelatedId); | ||
172 | restTemplate.delete(url, String.class); | ||
173 | } | 160 | } |
174 | 161 | ||
175 | public String addMemberRelatedInfo(MemberRelatedInfo resources) { | 162 | public String deleteAllCollection(String content) { |
176 | String entityBody = null; | 163 | String url = BASE_URL + "/ucEngine/api/userOperation/deleteAllCollection"; |
177 | String url = BASE_URL + "/api/MemberRelatedInfo/create"; | 164 | restTemplate.postForEntity(url, content, String.class); |
178 | log.info("request uc : url is " + url + ", memberRelatedId is " + JSONObject.toJSONString(resources)); | 165 | /*ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, content, String.class); |
179 | ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, resources, String.class); | 166 | String entityBody = ""; |
180 | if (responseEntity.getStatusCode().is2xxSuccessful()) { | 167 | if (responseEntity.getStatusCode().is2xxSuccessful()) { |
181 | entityBody = responseEntity.getBody(); | 168 | entityBody = responseEntity.getBody(); |
182 | // JSONObject jsonObject = JSONObject.parseObject(entityBody); | ||
183 | // if (jsonObject.getInteger("businessCode").equals(200)) { | ||
184 | // resultSet = jsonObject.getJSONArray("resultSet").getJSONObject(0); | ||
185 | // } | ||
186 | } | ||
187 | log.info("uc response: " + entityBody); | ||
188 | return entityBody; | ||
189 | } | 169 | } |
190 | 170 | log.info("uc response: " + entityBody);*/ | |
191 | public String updateMemberRelatedInfo(MemberRelatedInfo resources) { | 171 | return null; |
192 | String resultSet = ""; | ||
193 | String url = BASE_URL + "/api/MemberRelatedInfo/update"; | ||
194 | log.info("request uc : url is " + url + ", memberRelatedId is " + JSONObject.toJSONString(resources)); | ||
195 | restTemplate.put(url, resources); | ||
196 | |||
197 | return resultSet; | ||
198 | } | 172 | } |
199 | } | 173 | } | ... | ... |
1 | #配置数据源 | ||
2 | spring: | 1 | spring: |
2 | # 数据源 | ||
3 | datasource: | 3 | datasource: |
4 | # 测试/演示库 | 4 | # 数据源地址 |
5 | url: jdbc:log4jdbc:mysql://139.196.37.202:3306/tj_user_0819?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false | 5 | url: jdbc:log4jdbc:mysql://122.112.214.149:3306/tj_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false |
6 | # 用户名 | ||
6 | username: root | 7 | username: root |
7 | password: Topdraw1qaz | 8 | # 密码 |
8 | # url: jdbc:log4jdbc:mysql://122.112.214.149:3306/tj_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false | 9 | password: root |
9 | # username: root | 10 | # 驱动程序 |
10 | # password: root | ||
11 | driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy | 11 | driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy |
12 | #Druid | 12 | # Druid |
13 | type: com.alibaba.druid.pool.DruidDataSource | 13 | type: com.alibaba.druid.pool.DruidDataSource |
14 | druid: | 14 | druid: |
15 | # 初始化配置 | 15 | # 初始化配置 |
... | @@ -27,57 +27,149 @@ spring: | ... | @@ -27,57 +27,149 @@ spring: |
27 | test-while-idle: true | 27 | test-while-idle: true |
28 | test-on-borrow: false | 28 | test-on-borrow: false |
29 | test-on-return: false | 29 | test-on-return: false |
30 | |||
31 | validation-query: select 1 | 30 | validation-query: select 1 |
32 | # 配置监控统计拦截的filters | 31 | # 配置监控统计拦截的filters |
33 | filters: stat | 32 | filters: stat |
34 | stat-view-servlet: | 33 | stat-view-servlet: |
35 | url-pattern: /druid/* | 34 | url-pattern: /druid/* |
36 | reset-enable: false | 35 | reset-enable: false |
37 | 36 | # 过滤器 | |
38 | web-stat-filter: | 37 | web-stat-filter: |
39 | url-pattern: /* | 38 | url-pattern: /* |
40 | exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" | 39 | exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" |
41 | 40 | ||
41 | # freemarker | ||
42 | freemarker: | ||
43 | check-template-location: false | ||
44 | jackson: | ||
45 | time-zone: GMT+8 | ||
46 | data: | ||
47 | redis: | ||
48 | repositories: | ||
49 | enabled: false | ||
42 | 50 | ||
43 | rabbitmq: | 51 | # jpa |
44 | user-center: | ||
45 | host: 47.100.212.170 # rabbitmq的连接地址 | ||
46 | #host: 139.196.192.242 # rabbitmq的连接地址 | ||
47 | port: 5672 # rabbitmq的连接端口号 | ||
48 | virtual-host: / # rabbitmq的虚拟host | ||
49 | username: test # rabbitmq的用户名 | ||
50 | password: test # rabbitmq的密码 | ||
51 | publisher-confirms: true #如果对异步消息需要回调必须设置为true | ||
52 | member-service: | ||
53 | host: 139.196.145.150 # rabbitmq的连接地址 | ||
54 | port: 5672 # rabbitmq的连接端口号 | ||
55 | virtual-host: member_center # rabbitmq的虚拟host | ||
56 | username: admin # rabbitmq的用户名 | ||
57 | password: Topdraw1qaz # rabbitmq的密码 | ||
58 | publisher-confirms: true #如果对异步消息需要回调必须设置为true | ||
59 | |||
60 | |||
61 | #配置 Jpa | ||
62 | jpa: | 52 | jpa: |
53 | properties: | ||
54 | hibernate: | ||
55 | # 数据库类型 | ||
56 | dialect: org.hibernate.dialect.MySQL5InnoDBDialect | ||
63 | hibernate: | 57 | hibernate: |
64 | # 生产环境设置成 none,避免程序运行时自动更新数据库结构 | 58 | # 生产环境设置成 none,避免程序运行时自动更新数据库结构 |
65 | ddl-auto: none | 59 | ddl-auto: none |
60 | open-in-view: true | ||
61 | |||
62 | # 文件上传 | ||
66 | servlet: | 63 | servlet: |
67 | multipart: | 64 | multipart: |
68 | file-size-threshold: 2KB | 65 | file-size-threshold: 2KB |
69 | max-file-size: 100MB | 66 | max-file-size: 100MB |
70 | max-request-size: 200MB | 67 | max-request-size: 200MB |
68 | |||
69 | # redis | ||
71 | redis: | 70 | redis: |
72 | #数据库索引 | 71 | # 数据库索引 |
73 | database: 6 | 72 | database: 0 |
73 | # ip | ||
74 | host: 122.112.214.149 | 74 | host: 122.112.214.149 |
75 | # 密码是 | ||
76 | password: redis123 | ||
77 | # 端口 | ||
75 | port: 6379 | 78 | port: 6379 |
76 | #连接超时时间 | 79 | # 连接超时时间 |
77 | timeout: 5000 | 80 | timeout: 5000 |
78 | 81 | ||
82 | # rabbitmq | ||
83 | # rabbitmq: | ||
84 | # # ip | ||
85 | # host: 139.196.145.150 | ||
86 | # # 端口号 | ||
87 | # port: 5672 | ||
88 | # # 用户名 | ||
89 | # username: admin # rabbitmq的用户名 | ||
90 | # # 密码 | ||
91 | # password: Topdraw1qaz | ||
92 | # # 虚拟空间 | ||
93 | # virtual-host: member_center | ||
94 | # # 如果对异步消息需要回调必须设置为true | ||
95 | # publisher-confirms: true | ||
96 | |||
97 | #是否允许生成代码,生产环境设置为false | ||
98 | generator: | ||
99 | enabled: false | ||
100 | |||
101 | #是否开启 swagger-ui | ||
102 | swagger: | ||
103 | enabled: true | ||
104 | |||
105 | |||
106 | ###########################################自定义属性################################################################# | ||
107 | # 多mq配置 | ||
108 | mutil-mq: | ||
109 | # 服务侧 | ||
110 | service: | ||
111 | # ip | ||
112 | host: 139.196.192.242 | ||
113 | # 端口 | ||
114 | port: 5672 | ||
115 | # 用户名 | ||
116 | username: member_center | ||
117 | # 密码 | ||
118 | password: Tjlh@2021 | ||
119 | # 虚拟空间 | ||
120 | virtual-host: /member_center | ||
121 | |||
122 | # 管理侧 | ||
123 | management: | ||
124 | # ip | ||
125 | # host: 139.196.145.150 | ||
126 | # # 端口 | ||
127 | # port: 5672 | ||
128 | # # 用户名 | ||
129 | # username: admin | ||
130 | # # 密码 | ||
131 | # password: Topdraw1qaz | ||
132 | # # 虚拟空间 | ||
133 | # virtual-host: member_center | ||
134 | # ip | ||
135 | host: 139.196.145.150 | ||
136 | # 端口 | ||
137 | port: 5672 | ||
138 | # 用户名 | ||
139 | username: admin | ||
140 | # 密码 | ||
141 | password: Topdraw1qaz | ||
142 | # 虚拟空间 | ||
143 | virtual-host: /member_center | ||
79 | 144 | ||
80 | #jwt。依赖的common中有需要jwt的部分属性。 | 145 | #登录图形验证码有效时间/分钟 |
146 | loginCode: | ||
147 | expiration: 2 | ||
148 | |||
149 | # 服务属性 | ||
150 | service: | ||
151 | # 服务域 mobile:小屏侧 vis:大屏侧 | ||
152 | area: vis | ||
153 | #平台类型 service: 服务侧 management: 管理侧 | ||
154 | platform: service | ||
155 | |||
156 | # uc-engine服务地址 | ||
157 | api: | ||
158 | baseUrl: http://127.0.0.1:8447 | ||
159 | |||
160 | # 线程池设置 | ||
161 | task: | ||
162 | pool: | ||
163 | # 核心线程池大小 | ||
164 | core-pool-size: 10 | ||
165 | # 最大线程数 | ||
166 | max-pool-size: 30 | ||
167 | # 活跃时间 | ||
168 | keep-alive-seconds: 60 | ||
169 | # 队列容量 | ||
170 | queue-capacity: 50 | ||
171 | |||
172 | #权限 jwt。依赖的common中有需要jwt的部分属性。 | ||
81 | jwt: | 173 | jwt: |
82 | header: Authorization | 174 | header: Authorization |
83 | secret: mySecret | 175 | secret: mySecret |
... | @@ -91,31 +183,3 @@ jwt: | ... | @@ -91,31 +183,3 @@ jwt: |
91 | detect: 3600000 | 183 | detect: 3600000 |
92 | # 续期时间,2小时,单位毫秒 | 184 | # 续期时间,2小时,单位毫秒 |
93 | renew: 7200000 | 185 | renew: 7200000 |
... | \ No newline at end of file | ... | \ No newline at end of file |
94 | |||
95 | #是否允许生成代码,生产环境设置为false | ||
96 | generator: | ||
97 | enabled: true | ||
98 | |||
99 | #是否开启 swagger-ui | ||
100 | swagger: | ||
101 | enabled: true | ||
102 | |||
103 | |||
104 | |||
105 | # 文件存储路径(相对路径) | ||
106 | file: | ||
107 | path: system/file | ||
108 | avatar: system/avatar | ||
109 | upload: upload | ||
110 | # 文件大小 /M | ||
111 | maxSize: 100 | ||
112 | avatarMaxSize: 5 | ||
113 | |||
114 | uc: | ||
115 | service: | ||
116 | # uc两侧部署,需配置位于哪一侧 mobile小屏侧 vis大屏侧 | ||
117 | type: vis | ||
118 | |||
119 | api: | ||
120 | # baseUrl: http://139.196.4.234:8447 | ||
121 | baseUrl: http://localhost:8447 | ... | ... |
1 | #配置数据源 | ||
2 | spring: | ||
3 | datasource: | ||
4 | url: jdbc:log4jdbc:mysql://172.0.31.91:3306/tj_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false | ||
5 | username: root | ||
6 | password: Tjlh@2021 | ||
7 | driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy | ||
8 | #Druid | ||
9 | type: com.alibaba.druid.pool.DruidDataSource | ||
10 | druid: | ||
11 | # 初始化配置 | ||
12 | initial-size: 3 | ||
13 | # 最小连接数 | ||
14 | min-idle: 3 | ||
15 | # 最大连接数 | ||
16 | max-active: 15 | ||
17 | # 获取连接超时时间 | ||
18 | max-wait: 5000 | ||
19 | # 连接有效性检测时间 | ||
20 | time-between-eviction-runs-millis: 90000 | ||
21 | # 最大空闲时间 | ||
22 | min-evictable-idle-time-millis: 1800000 | ||
23 | test-while-idle: true | ||
24 | test-on-borrow: false | ||
25 | test-on-return: false | ||
26 | |||
27 | validation-query: select 1 | ||
28 | # 配置监控统计拦截的filters | ||
29 | filters: stat | ||
30 | stat-view-servlet: | ||
31 | url-pattern: /druid/* | ||
32 | reset-enable: false | ||
33 | |||
34 | web-stat-filter: | ||
35 | url-pattern: /* | ||
36 | exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" | ||
37 | |||
38 | #配置 Jpa | ||
39 | jpa: | ||
40 | hibernate: | ||
41 | # 生产环境设置成 none,避免程序运行时自动更新数据库结构 | ||
42 | ddl-auto: none | ||
43 | servlet: | ||
44 | multipart: | ||
45 | file-size-threshold: 2KB | ||
46 | max-file-size: 100MB | ||
47 | max-request-size: 200MB | ||
48 | redis: | ||
49 | #数据库索引 | ||
50 | database: 0 | ||
51 | host: 127.0.0.1 | ||
52 | port: 6379 | ||
53 | password: | ||
54 | #连接超时时间 | ||
55 | timeout: 5000 | ||
56 | rabbitmq: | ||
57 | host: 172.0.31.96 # rabbitmq的连接地址 | ||
58 | port: 5672 # rabbitmq的连接端口号 | ||
59 | virtual-host: member_center # rabbitmq的虚拟host | ||
60 | username: admin # rabbitmq的用户名 | ||
61 | password: Tjlh@2021 # rabbitmq的密码 | ||
62 | publisher-confirms: true #如果对异步消息需要回调必须设置为true | ||
63 | listener: | ||
64 | direct: | ||
65 | auto-startup: false | ||
66 | simple: | ||
67 | auto-startup: false | ||
68 | |||
69 | #jwt。依赖的common中有需要jwt的部分属性。 | ||
70 | jwt: | ||
71 | header: Authorization | ||
72 | secret: mySecret | ||
73 | # token 过期时间/毫秒,6小时 1小时 = 3600000 毫秒 | ||
74 | expiration: 7200000 | ||
75 | # 在线用户key | ||
76 | online: online-token | ||
77 | # 验证码 | ||
78 | codeKey: code-key | ||
79 | # token 续期检查时间范围(60分钟,单位毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期 | ||
80 | detect: 3600000 | ||
81 | # 续期时间,2小时,单位毫秒 | ||
82 | renew: 7200000 | ||
83 | |||
84 | #是否允许生成代码,生产环境设置为false | ||
85 | generator: | ||
86 | enabled: true | ||
87 | |||
88 | #是否开启 swagger-ui | ||
89 | swagger: | ||
90 | enabled: true | ||
91 | |||
92 | # 文件存储路径(相对路径) | ||
93 | file: | ||
94 | path: system/file | ||
95 | avatar: system/avatar | ||
96 | upload: upload | ||
97 | # 文件大小 /M | ||
98 | maxSize: 100 | ||
99 | avatarMaxSize: 5 | ||
100 | |||
101 | uc: | ||
102 | service: | ||
103 | # uc两侧部署,需配置位于哪一侧 mobile小屏侧 vis大屏侧 | ||
104 | type: vis | ||
105 | |||
106 | api: | ||
107 | # baseUrl: http://139.196.4.234:8447 | ||
108 | baseUrl: http://172.0.31.94:8447 |
1 | #配置数据源 | ||
2 | spring: | ||
3 | datasource: | ||
4 | # 测试/演示库 | ||
5 | #url: jdbc:log4jdbc:mysql://139.196.37.202:3306/tj_user_0819?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false | ||
6 | #username: root | ||
7 | #password: Topdraw1qaz | ||
8 | url: jdbc:log4jdbc:mysql://122.112.214.149:3306/tj_user?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false | ||
9 | username: root | ||
10 | password: root | ||
11 | driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy | ||
12 | # driverClassName: com.mysql.jdbc.Driver | ||
13 | #Druid | ||
14 | type: com.alibaba.druid.pool.DruidDataSource | ||
15 | druid: | ||
16 | # 初始化配置 | ||
17 | initial-size: 3 | ||
18 | # 最小连接数 | ||
19 | min-idle: 3 | ||
20 | # 最大连接数 | ||
21 | max-active: 15 | ||
22 | # 获取连接超时时间 | ||
23 | max-wait: 5000 | ||
24 | # 连接有效性检测时间 | ||
25 | time-between-eviction-runs-millis: 90000 | ||
26 | # 最大空闲时间 | ||
27 | min-evictable-idle-time-millis: 1800000 | ||
28 | test-while-idle: true | ||
29 | test-on-borrow: false | ||
30 | test-on-return: false | ||
31 | |||
32 | validation-query: select 1 | ||
33 | # 配置监控统计拦截的filters | ||
34 | filters: stat | ||
35 | stat-view-servlet: | ||
36 | url-pattern: /druid/* | ||
37 | reset-enable: false | ||
38 | |||
39 | web-stat-filter: | ||
40 | url-pattern: /* | ||
41 | exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" | ||
42 | |||
43 | #配置 Jpa | ||
44 | jpa: | ||
45 | hibernate: | ||
46 | # 生产环境设置成 none,避免程序运行时自动更新数据库结构 | ||
47 | ddl-auto: none | ||
48 | servlet: | ||
49 | multipart: | ||
50 | file-size-threshold: 2KB | ||
51 | max-file-size: 100MB | ||
52 | max-request-size: 200MB | ||
53 | redis: | ||
54 | #数据库索引 | ||
55 | database: 6 | ||
56 | host: 127.0.0.1 | ||
57 | port: 6379 | ||
58 | password: | ||
59 | #连接超时时间 | ||
60 | timeout: 5000 | ||
61 | rabbitmq: | ||
62 | host: 122.112.214.149 # rabbitmq的连接地址 | ||
63 | #host: 139.196.192.242 # rabbitmq的连接地址 | ||
64 | port: 5672 # rabbitmq的连接端口号 | ||
65 | #virtual-host: /member_center # rabbitmq的虚拟host | ||
66 | #username: member_center # rabbitmq的用户名 | ||
67 | #password: Tjlh@2021 # rabbitmq的密码 | ||
68 | virtual-host: / # rabbitmq的虚拟host | ||
69 | username: guest # rabbitmq的用户名 | ||
70 | password: guest # rabbitmq的密码 | ||
71 | publisher-confirms: true #如果对异步消息需要回调必须设置为true | ||
72 | |||
73 | #jwt。依赖的common中有需要jwt的部分属性。 | ||
74 | jwt: | ||
75 | header: Authorization | ||
76 | secret: mySecret | ||
77 | # token 过期时间/毫秒,6小时 1小时 = 3600000 毫秒 | ||
78 | expiration: 7200000 | ||
79 | # 在线用户key | ||
80 | online: online-token | ||
81 | # 验证码 | ||
82 | codeKey: code-key | ||
83 | # token 续期检查时间范围(60分钟,单位毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期 | ||
84 | detect: 3600000 | ||
85 | # 续期时间,2小时,单位毫秒 | ||
86 | renew: 7200000 | ||
87 | |||
88 | #是否允许生成代码,生产环境设置为false | ||
89 | generator: | ||
90 | enabled: true | ||
91 | |||
92 | #是否开启 swagger-ui | ||
93 | swagger: | ||
94 | enabled: true | ||
95 | |||
96 | # 文件存储路径(相对路径) | ||
97 | file: | ||
98 | path: system/file | ||
99 | avatar: system/avatar | ||
100 | upload: upload | ||
101 | # 文件大小 /M | ||
102 | maxSize: 100 | ||
103 | avatarMaxSize: 5 | ||
104 | |||
105 | uc: | ||
106 | service: | ||
107 | # uc两侧部署,需配置位于哪一侧 mobile小屏侧 vis大屏侧 | ||
108 | type: mobile | ||
109 | |||
110 | api: | ||
111 | # baseUrl: http://139.196.4.234:8447 | ||
112 | baseUrl: http://localhost:8447 |
1 | # 服务器 | ||
1 | server: | 2 | server: |
3 | # 服务端口号 | ||
2 | port: 8448 | 4 | port: 8448 |
3 | 5 | ||
4 | spring: | 6 | spring: |
7 | # 服务 | ||
5 | application: | 8 | application: |
6 | name: member-engine | 9 | # 服务名 |
7 | freemarker: | 10 | name: uc-consumer |
8 | check-template-location: false | 11 | # 配置文件 |
9 | profiles: | 12 | profiles: |
13 | # 启动具体的配置文件 | ||
10 | active: dev | 14 | active: dev |
11 | jackson: | ||
12 | time-zone: GMT+8 | ||
13 | data: | ||
14 | redis: | ||
15 | repositories: | ||
16 | enabled: false | ||
17 | 15 | ||
18 | #配置 Jpa | ||
19 | jpa: | ||
20 | properties: | ||
21 | hibernate: | ||
22 | dialect: org.hibernate.dialect.MySQL5InnoDBDialect | ||
23 | open-in-view: true | ||
24 | 16 | ||
25 | 17 | ||
26 | task: | ||
27 | pool: | ||
28 | # 核心线程池大小 | ||
29 | core-pool-size: 10 | ||
30 | # 最大线程数 | ||
31 | max-pool-size: 30 | ||
32 | # 活跃时间 | ||
33 | keep-alive-seconds: 60 | ||
34 | # 队列容量 | ||
35 | queue-capacity: 50 | ||
36 | |||
37 | #登录图形验证码有效时间/分钟 | ||
38 | loginCode: | ||
39 | expiration: 2 | ||
40 | |||
41 | #默认上传图片类型 | ||
42 | default-image-type: -1 | ... | ... |
-
Please register or sign in to post a comment