1.优化
Showing
8 changed files
with
118 additions
and
172 deletions
... | @@ -58,6 +58,7 @@ public class UserOperationServiceImpl implements UserOperationService { | ... | @@ -58,6 +58,7 @@ public class UserOperationServiceImpl implements UserOperationService { |
58 | 58 | ||
59 | // 会员不存在 | 59 | // 会员不存在 |
60 | MemberDTO memberDTO = memberAndWeixinUserDTO.getMemberDTO(); | 60 | MemberDTO memberDTO = memberAndWeixinUserDTO.getMemberDTO(); |
61 | memberDTO.setId(null); | ||
61 | MemberDTO _memberDTO = this.createMember(memberDTO); | 62 | MemberDTO _memberDTO = this.createMember(memberDTO); |
62 | 63 | ||
63 | userWeixinDTO.setMemberId(_memberDTO.getId()); | 64 | userWeixinDTO.setMemberId(_memberDTO.getId()); |
... | @@ -87,8 +88,9 @@ public class UserOperationServiceImpl implements UserOperationService { | ... | @@ -87,8 +88,9 @@ public class UserOperationServiceImpl implements UserOperationService { |
87 | UserTvDTO _userTvDTO = this.userTvService.findByPlatformAccount(platformAccount); | 88 | UserTvDTO _userTvDTO = this.userTvService.findByPlatformAccount(platformAccount); |
88 | if (Objects.isNull(_userTvDTO)) { | 89 | if (Objects.isNull(_userTvDTO)) { |
89 | 90 | ||
91 | memberDTO.setId(null); | ||
90 | // 创建大屏会员 | 92 | // 创建大屏会员 |
91 | MemberDTO _memberDTO = this.createMember(memberAndUserTvDTO.getMemberDTO()); | 93 | MemberDTO _memberDTO = this.createMember(memberDTO); |
92 | userTvDTO.setMemberId(_memberDTO.getId()); | 94 | userTvDTO.setMemberId(_memberDTO.getId()); |
93 | // 创建大屏账号 | 95 | // 创建大屏账号 |
94 | this.createUserTv(userTvDTO); | 96 | this.createUserTv(userTvDTO); | ... | ... |
... | @@ -18,7 +18,6 @@ import org.springframework.context.annotation.Primary; | ... | @@ -18,7 +18,6 @@ import org.springframework.context.annotation.Primary; |
18 | @Configuration | 18 | @Configuration |
19 | public class RabbitMqConfig { | 19 | public class RabbitMqConfig { |
20 | 20 | ||
21 | |||
22 | //////////////////////////////////////////////////////// OMO 小屏/////////////////////////////////////////////////////////////// | 21 | //////////////////////////////////////////////////////// OMO 小屏/////////////////////////////////////////////////////////////// |
23 | 22 | ||
24 | /** 获取带参二维码(大屏->小屏) */ | 23 | /** 获取带参二维码(大屏->小屏) */ |
... | @@ -36,21 +35,6 @@ public class RabbitMqConfig { | ... | @@ -36,21 +35,6 @@ public class RabbitMqConfig { |
36 | /** 微信侧 公众号关注与取消关注 */ | 35 | /** 微信侧 公众号关注与取消关注 */ |
37 | public static final String WEIXIN_SUBORUNSUB_QUEUE = "weixin.subOrUnSub.queue"; | 36 | public static final String WEIXIN_SUBORUNSUB_QUEUE = "weixin.subOrUnSub.queue"; |
38 | 37 | ||
39 | //////////////////////////////////////////////////////// 重数 /////////////////////////////////////////////////////////////// | ||
40 | |||
41 | /** 路由(事件)--direct route.key*/ | ||
42 | // 事件,uc-gateway | ||
43 | // public static final String UC_ROUTE_KEY_DIRECT_EVENT_AAA = "uc.route.key.direct.event.aaa"; | ||
44 | public static final String UC_ROUTE_KEY_DIRECT_EVENT_AAA = "gateway.common.consumer.event.direct"; | ||
45 | public static final String UC_EVENTBUS_TOPIC = "uc.eventbus.aa"; | ||
46 | // uc-service 服务侧 | ||
47 | public static final String UC_ROUTE_KEY_DIRECT_EVENT_BBB = "uc.route.key.direct.event.bbb"; | ||
48 | // uc-service 管理侧 | ||
49 | public static final String UC_ROUTE_KEY_DIRECT_EVENT_CCC = "uc.route.key.direct.event.ccc"; | ||
50 | |||
51 | public static final String ENGINE_TO_IPTV_CONSUMER_MEMBER_DIRECT = "engine.iptv.consumer.member.direct"; | ||
52 | |||
53 | |||
54 | 38 | ||
55 | @Value("${mutil-mq.service.host}") | 39 | @Value("${mutil-mq.service.host}") |
56 | private String serviceHost; | 40 | private String serviceHost; |
... | @@ -75,7 +59,6 @@ public class RabbitMqConfig { | ... | @@ -75,7 +59,6 @@ public class RabbitMqConfig { |
75 | return connectionFactory; | 59 | return connectionFactory; |
76 | } | 60 | } |
77 | 61 | ||
78 | // @ConditionalOnProperty(prefix = "mutil-mq", name = "service.startup", havingValue = "on") | ||
79 | @Bean(name = "serviceRabbitListenerContainerFactory") | 62 | @Bean(name = "serviceRabbitListenerContainerFactory") |
80 | @Primary | 63 | @Primary |
81 | public RabbitListenerContainerFactory userCenterRabbitListenerContainerFactory( | 64 | public RabbitListenerContainerFactory userCenterRabbitListenerContainerFactory( |
... | @@ -94,7 +77,6 @@ public class RabbitMqConfig { | ... | @@ -94,7 +77,6 @@ public class RabbitMqConfig { |
94 | } | 77 | } |
95 | 78 | ||
96 | 79 | ||
97 | |||
98 | @Value("${mutil-mq.management.host}") | 80 | @Value("${mutil-mq.management.host}") |
99 | private String managementHost; | 81 | private String managementHost; |
100 | @Value("${mutil-mq.management.port}") | 82 | @Value("${mutil-mq.management.port}") |
... | @@ -117,7 +99,6 @@ public class RabbitMqConfig { | ... | @@ -117,7 +99,6 @@ public class RabbitMqConfig { |
117 | return connectionFactory; | 99 | return connectionFactory; |
118 | } | 100 | } |
119 | 101 | ||
120 | // @ConditionalOnProperty(prefix = "mutil-mq", name = "management.startup", havingValue = "on") | ||
121 | @Bean(name = "managementRabbitListenerContainerFactory") | 102 | @Bean(name = "managementRabbitListenerContainerFactory") |
122 | public RabbitListenerContainerFactory memberServiceRabbitListenerContainerFactory( | 103 | public RabbitListenerContainerFactory memberServiceRabbitListenerContainerFactory( |
123 | SimpleRabbitListenerContainerFactoryConfigurer containerFactoryConfigurer, | 104 | SimpleRabbitListenerContainerFactoryConfigurer containerFactoryConfigurer, |
... | @@ -134,44 +115,94 @@ public class RabbitMqConfig { | ... | @@ -134,44 +115,94 @@ public class RabbitMqConfig { |
134 | return u; | 115 | return u; |
135 | } | 116 | } |
136 | 117 | ||
118 | /**************************************************uc-getaway-iptv 2 uc-consumer-service*************************************************************/ | ||
137 | 119 | ||
138 | public static final String UC_EVENTBUS = "uc.eventbus"; | 120 | public static final String GATEWAY_TO_SERVICE_DIRECT = "uc.gateway.service.direct"; |
139 | public static final String UC_EVENTBUS_KEY = "uc.eventbus.*.topic"; | ||
140 | 121 | ||
141 | /** | ||
142 | * 处理事件 | ||
143 | * @return org.springframework.amqp.core.Queue | ||
144 | * @author XiangHan | ||
145 | * @date 2021/9/7 10:19 上午 | ||
146 | */ | ||
147 | @Bean | 122 | @Bean |
148 | public Queue eventDirect() { | 123 | public Queue eventDirect() { |
149 | return new Queue(UC_ROUTE_KEY_DIRECT_EVENT_AAA); | 124 | return new Queue(GATEWAY_TO_SERVICE_DIRECT); |
150 | } | 125 | } |
151 | 126 | ||
152 | /** | ||
153 | * 处理事件 | ||
154 | * @return org.springframework.amqp.core.Queue | ||
155 | * @author XiangHan | ||
156 | * @date 2021/9/7 10:19 上午 | ||
157 | */ | ||
158 | @Bean | 127 | @Bean |
159 | public Queue eventTopic() { | 128 | Binding eventBinding(DirectExchange managementExchange , Queue eventDirect) { |
160 | return new Queue(UC_EVENTBUS_TOPIC); | 129 | BindingBuilder.DirectExchangeRoutingKeyConfigurer directExchangeRoutingKeyConfigurer = |
130 | BindingBuilder.bind(eventDirect).to(managementExchange); | ||
131 | return directExchangeRoutingKeyConfigurer.with(ENGINE_TO_SERVICE_DIRECT); | ||
132 | } | ||
133 | |||
134 | |||
135 | /**************************************************uc-engine-management 2 uc-consumer-service*************************************************************/ | ||
136 | |||
137 | public static final String UC_DIRECT_MANAGEMENT = "uc.direct.management"; | ||
138 | // uc-service-management 2 uc-consumer-iptv | ||
139 | public static final String ENGINE_TO_SERVICE_DIRECT = "uc.engine.service.direct"; | ||
140 | |||
141 | @Bean | ||
142 | public Queue managementDirect() { | ||
143 | return new Queue(ENGINE_TO_SERVICE_DIRECT); | ||
144 | } | ||
145 | |||
146 | @Bean | ||
147 | DirectExchange managementExchange(){ | ||
148 | return ExchangeBuilder.directExchange(UC_DIRECT_MANAGEMENT).build(); | ||
149 | } | ||
150 | |||
151 | @Bean | ||
152 | Binding managementBinding(DirectExchange managementExchange , Queue managementDirect) { | ||
153 | BindingBuilder.DirectExchangeRoutingKeyConfigurer directExchangeRoutingKeyConfigurer = | ||
154 | BindingBuilder.bind(managementDirect).to(managementExchange); | ||
155 | return directExchangeRoutingKeyConfigurer.with(ENGINE_TO_SERVICE_DIRECT); | ||
161 | } | 156 | } |
162 | 157 | ||
163 | 158 | ||
159 | /**************************************************uc-engine-service 2 uc-consumer-management*************************************************************/ | ||
160 | |||
161 | |||
162 | public static final String UC_DIRECT_SERVICE = "uc.direct"; | ||
163 | // uc-service-iptv 2 uc-consumer-management | ||
164 | public static final String ENGINE_TO_MANAGEMENT_DIRECT = "uc.engine.management.direct"; | ||
165 | |||
166 | @Bean | ||
167 | public Queue serviceDirect() { | ||
168 | return new Queue(ENGINE_TO_MANAGEMENT_DIRECT); | ||
169 | } | ||
170 | |||
171 | @Bean | ||
172 | DirectExchange serviceExchange(){ | ||
173 | return ExchangeBuilder.directExchange(UC_DIRECT_SERVICE).build(); | ||
174 | } | ||
175 | |||
176 | @Bean | ||
177 | Binding serviceBinding(DirectExchange serviceExchange , Queue serviceDirect) { | ||
178 | BindingBuilder.DirectExchangeRoutingKeyConfigurer directExchangeRoutingKeyConfigurer = | ||
179 | BindingBuilder.bind(serviceDirect).to(serviceExchange); | ||
180 | return directExchangeRoutingKeyConfigurer.with(ENGINE_TO_MANAGEMENT_DIRECT); | ||
181 | } | ||
182 | |||
183 | |||
184 | |||
185 | /**************************************************数据基座*************************************************************/ | ||
186 | public static final String UC_EVENTBUS = "uc.eventbus"; | ||
187 | public static final String UC_EVENTBUS_KEY = "uc.eventbus.*.topic"; | ||
188 | public static final String UC_EVENTBUS_TOPIC = "uc.eventbus"; | ||
189 | |||
190 | @Bean | ||
191 | public Queue eventBusQueue() { | ||
192 | return new Queue(UC_EVENTBUS_TOPIC); | ||
193 | } | ||
194 | |||
164 | @Bean | 195 | @Bean |
165 | TopicExchange eventBusDirect() { | 196 | TopicExchange eventBusExchange() { |
166 | return ExchangeBuilder.topicExchange(UC_EVENTBUS) | 197 | return ExchangeBuilder.topicExchange(UC_EVENTBUS) |
167 | .durable(true).build(); | 198 | .durable(true).build(); |
168 | } | 199 | } |
169 | 200 | ||
170 | @Bean | 201 | @Bean |
171 | Binding collectionAddBinding(TopicExchange eventBusDirect, Queue eventTopic) { | 202 | Binding eventBusBinding(TopicExchange eventBusExchange, Queue eventBusQueue) { |
172 | return BindingBuilder | 203 | return BindingBuilder |
173 | .bind(eventTopic) | 204 | .bind(eventBusQueue) |
174 | .to(eventBusDirect) | 205 | .to(eventBusExchange) |
175 | .with(UC_EVENTBUS_KEY); | 206 | .with(UC_EVENTBUS_KEY); |
176 | } | 207 | } |
177 | } | 208 | } | ... | ... |
1 | package com.topdraw.config; | ||
2 | |||
3 | import org.springframework.context.annotation.Condition; | ||
4 | import org.springframework.context.annotation.ConditionContext; | ||
5 | import org.springframework.core.type.AnnotatedTypeMetadata; | ||
6 | |||
7 | /** | ||
8 | * @author : | ||
9 | * @description: | ||
10 | * @function : | ||
11 | * @date :Created in 2022/4/4 17:45 | ||
12 | * @version: : | ||
13 | * @modified By: | ||
14 | * @since : modified in 2022/4/4 17:45 | ||
15 | */ | ||
16 | public class RabbitmqStartupCondition implements Condition { | ||
17 | |||
18 | |||
19 | @Override | ||
20 | public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { | ||
21 | return false; | ||
22 | } | ||
23 | } |
... | @@ -30,7 +30,7 @@ public class UcEngineManagementEventConsumer { | ... | @@ -30,7 +30,7 @@ public class UcEngineManagementEventConsumer { |
30 | */ | 30 | */ |
31 | @RabbitHandler | 31 | @RabbitHandler |
32 | @RabbitListener(bindings = { | 32 | @RabbitListener(bindings = { |
33 | @QueueBinding(value = @Queue(value = RabbitMqConfig.UC_ROUTE_KEY_DIRECT_EVENT_CCC), | 33 | @QueueBinding(value = @Queue(value = RabbitMqConfig.ENGINE_TO_SERVICE_DIRECT), |
34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) | 34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) |
35 | }, containerFactory = "serviceRabbitListenerContainerFactory") | 35 | }, containerFactory = "serviceRabbitListenerContainerFactory") |
36 | public void ucEventConsumer(String content) { | 36 | public void ucEventConsumer(String content) { | ... | ... |
... | @@ -38,13 +38,9 @@ public class UcEventBusConsumer { | ... | @@ -38,13 +38,9 @@ public class UcEventBusConsumer { |
38 | * @author Hongyan Wang | 38 | * @author Hongyan Wang |
39 | * @date 2021/9/7 11:26 上午 | 39 | * @date 2021/9/7 11:26 上午 |
40 | */ | 40 | */ |
41 | /*@RabbitHandler | 41 | @RabbitHandler |
42 | @RabbitListener(bindings = { | 42 | @RabbitListener(queues = RabbitMqConfig.UC_EVENTBUS_TOPIC, |
43 | @QueueBinding(value = @Queue(value = RabbitMqConfig.UC_EVENTBUS_TOPIC), | 43 | containerFactory = "managementRabbitListenerContainerFactory") |
44 | exchange = @Exchange(type = ExchangeTypes.TOPIC, name = RabbitMqConfig.UC_EVENTBUS), | ||
45 | key = RabbitMqConfig.UC_EVENTBUS_KEY) | ||
46 | }, containerFactory = "managementRabbitListenerContainerFactory")*/ | ||
47 | @RabbitListener(queues = RabbitMqConfig.UC_EVENTBUS_TOPIC, containerFactory = "managementRabbitListenerContainerFactory") | ||
48 | public void ucEventConsumer(String content) { | 44 | public void ucEventConsumer(String content) { |
49 | log.info(" receive dataSync msg , content is : {} ", content); | 45 | log.info(" receive dataSync msg , content is : {} ", content); |
50 | DataSyncMsg dataSyncMsg = this.parseContent(content); | 46 | DataSyncMsg dataSyncMsg = this.parseContent(content); | ... | ... |
... | @@ -28,15 +28,15 @@ public class UcGatewayEventConsumer { | ... | @@ -28,15 +28,15 @@ public class UcGatewayEventConsumer { |
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.GATEWAY_TO_SERVICE_DIRECT), |
34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) | 34 | exchange = @Exchange(value = ExchangeTypes.DIRECT)) |
35 | }, containerFactory = "managementRabbitListenerContainerFactory")*/ | 35 | }, containerFactory = "managementRabbitListenerContainerFactory") |
36 | public void ucEventConsumer(String content) { | 36 | public void ucEventConsumer(String content) { |
37 | log.info(" receive dataSync msg , content is : {} ", content); | 37 | log.info(" receive dataSync msg , content is : {} ", content); |
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 | ... | ... |
... | @@ -10,6 +10,7 @@ import com.topdraw.utils.StringUtils; | ... | @@ -10,6 +10,7 @@ import com.topdraw.utils.StringUtils; |
10 | import lombok.extern.slf4j.Slf4j; | 10 | import lombok.extern.slf4j.Slf4j; |
11 | import org.springframework.amqp.core.ExchangeTypes; | 11 | import org.springframework.amqp.core.ExchangeTypes; |
12 | import org.springframework.amqp.rabbit.annotation.*; | 12 | import org.springframework.amqp.rabbit.annotation.*; |
13 | import org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry; | ||
13 | import org.springframework.beans.factory.annotation.Autowired; | 14 | import org.springframework.beans.factory.annotation.Autowired; |
14 | import org.springframework.beans.factory.annotation.Value; | 15 | import org.springframework.beans.factory.annotation.Value; |
15 | import org.springframework.stereotype.Component; | 16 | import org.springframework.stereotype.Component; |
... | @@ -22,7 +23,6 @@ import org.springframework.transaction.annotation.Transactional; | ... | @@ -22,7 +23,6 @@ import org.springframework.transaction.annotation.Transactional; |
22 | @Slf4j | 23 | @Slf4j |
23 | public class WeiXinEventConsumer { | 24 | public class WeiXinEventConsumer { |
24 | 25 | ||
25 | |||
26 | @Autowired | 26 | @Autowired |
27 | private RestTemplateClient restTemplateClient; | 27 | private RestTemplateClient restTemplateClient; |
28 | 28 | ||
... | @@ -32,11 +32,11 @@ public class WeiXinEventConsumer { | ... | @@ -32,11 +32,11 @@ public class WeiXinEventConsumer { |
32 | * @description 删除用户收藏记录 | 32 | * @description 删除用户收藏记录 |
33 | * @param content 消息内容 | 33 | * @param content 消息内容 |
34 | */ | 34 | */ |
35 | @RabbitHandler | 35 | /*@RabbitHandler |
36 | @RabbitListener(bindings = { | 36 | @RabbitListener(bindings = { |
37 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_DELETE_QUEUE), | 37 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_DELETE_QUEUE), |
38 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, | 38 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, |
39 | containerFactory = "managementRabbitListenerContainerFactory") | 39 | containerFactory = "managementRabbitListenerContainerFactory")*/ |
40 | public void deleteCollection(String content) { | 40 | public void deleteCollection(String content) { |
41 | try { | 41 | try { |
42 | log.info("receive UserCollection delete message, content {}", content); | 42 | log.info("receive UserCollection delete message, content {}", content); |
... | @@ -50,11 +50,11 @@ public class WeiXinEventConsumer { | ... | @@ -50,11 +50,11 @@ public class WeiXinEventConsumer { |
50 | * @description 删除全部收藏记录 | 50 | * @description 删除全部收藏记录 |
51 | * @param content 消息内容 | 51 | * @param content 消息内容 |
52 | */ | 52 | */ |
53 | @RabbitHandler | 53 | /* @RabbitHandler |
54 | @RabbitListener(bindings = { | 54 | @RabbitListener(bindings = { |
55 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_DELETE_ALL_QUEUE), | 55 | @QueueBinding(value = @Queue(value = RabbitMqConfig.COLLECTION_DELETE_ALL_QUEUE), |
56 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, | 56 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, |
57 | containerFactory = "managementRabbitListenerContainerFactory") | 57 | containerFactory = "managementRabbitListenerContainerFactory")*/ |
58 | @Transactional | 58 | @Transactional |
59 | public void deleteAllCollection(String content) { | 59 | public void deleteAllCollection(String content) { |
60 | try { | 60 | try { |
... | @@ -70,11 +70,11 @@ public class WeiXinEventConsumer { | ... | @@ -70,11 +70,11 @@ public class WeiXinEventConsumer { |
70 | * @param content 消息内容 | 70 | * @param content 消息内容 |
71 | * @description 获取公众号带参二维码 | 71 | * @description 获取公众号带参二维码 |
72 | */ | 72 | */ |
73 | @RabbitHandler | 73 | /*@RabbitHandler |
74 | @RabbitListener(bindings = { | 74 | @RabbitListener(bindings = { |
75 | @QueueBinding(value = @Queue(value = RabbitMqConfig.GET_QR_CODE_QUEUE), | 75 | @QueueBinding(value = @Queue(value = RabbitMqConfig.GET_QR_CODE_QUEUE), |
76 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, | 76 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, |
77 | containerFactory = "managementRabbitListenerContainerFactory") | 77 | containerFactory = "managementRabbitListenerContainerFactory")*/ |
78 | public void getQrCode(String content) { | 78 | public void getQrCode(String content) { |
79 | try { | 79 | try { |
80 | log.info("receive get qrCode message, content {}", content); | 80 | log.info("receive get qrCode message, content {}", content); |
... | @@ -130,11 +130,11 @@ public class WeiXinEventConsumer { | ... | @@ -130,11 +130,11 @@ public class WeiXinEventConsumer { |
130 | * } | 130 | * } |
131 | * @param content | 131 | * @param content |
132 | */ | 132 | */ |
133 | @RabbitHandler | 133 | /* @RabbitHandler |
134 | @RabbitListener(bindings = { | 134 | @RabbitListener(bindings = { |
135 | @QueueBinding(value = @Queue(value = RabbitMqConfig.WEIXIN_SUBORUNSUB_QUEUE), | 135 | @QueueBinding(value = @Queue(value = RabbitMqConfig.WEIXIN_SUBORUNSUB_QUEUE), |
136 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, | 136 | exchange = @Exchange(value = ExchangeTypes.DIRECT))}, |
137 | containerFactory = "managementRabbitListenerContainerFactory") | 137 | containerFactory = "managementRabbitListenerContainerFactory")*/ |
138 | @Transactional | 138 | @Transactional |
139 | public void subOrUnSubEvent(String content) { | 139 | public void subOrUnSubEvent(String content) { |
140 | try { | 140 | try { | ... | ... |
... | @@ -2,11 +2,14 @@ spring: | ... | @@ -2,11 +2,14 @@ spring: |
2 | # 数据源 | 2 | # 数据源 |
3 | datasource: | 3 | datasource: |
4 | # 数据源地址 | 4 | # 数据源地址 |
5 | url: jdbc:log4jdbc:mysql://139.196.192.242:3306/tj_user_0819?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false | 5 | # url: jdbc:log4jdbc:mysql://139.196.192.242:3306/tj_user_0819?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false |
6 | # 用户名 | 6 | # # 用户名 |
7 | # username: root | ||
8 | # # 密码 | ||
9 | # password: Tjlh@2017 | ||
10 | url: jdbc:log4jdbc:mysql://122.112.214.149:3306/tj_user_admin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false | ||
7 | username: root | 11 | username: root |
8 | # 密码 | 12 | password: root |
9 | password: Tjlh@2017 | ||
10 | # 驱动程序 | 13 | # 驱动程序 |
11 | driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy | 14 | driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy |
12 | # Druid | 15 | # Druid |
... | @@ -38,16 +41,6 @@ spring: | ... | @@ -38,16 +41,6 @@ spring: |
38 | url-pattern: /* | 41 | url-pattern: /* |
39 | exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" | 42 | exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" |
40 | 43 | ||
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 | ||
50 | |||
51 | # jpa | 44 | # jpa |
52 | jpa: | 45 | jpa: |
53 | properties: | 46 | properties: |
... | @@ -59,13 +52,6 @@ spring: | ... | @@ -59,13 +52,6 @@ spring: |
59 | ddl-auto: none | 52 | ddl-auto: none |
60 | open-in-view: true | 53 | open-in-view: true |
61 | 54 | ||
62 | # 文件上传 | ||
63 | servlet: | ||
64 | multipart: | ||
65 | file-size-threshold: 2KB | ||
66 | max-file-size: 100MB | ||
67 | max-request-size: 200MB | ||
68 | |||
69 | # redis | 55 | # redis |
70 | redis: | 56 | redis: |
71 | #数据库索引 | 57 | #数据库索引 |
... | @@ -76,29 +62,6 @@ spring: | ... | @@ -76,29 +62,6 @@ spring: |
76 | #连接超时时间 | 62 | #连接超时时间 |
77 | timeout: 5000 | 63 | timeout: 5000 |
78 | 64 | ||
79 | # rabbitmq | ||
80 | # rabbitmq: | ||
81 | # # ip | ||
82 | # host: 139.196.145.150 | ||
83 | # # 端口号 | ||
84 | # port: 5672 | ||
85 | # # 用户名 | ||
86 | # username: admin # rabbitmq的用户名 | ||
87 | # # 密码 | ||
88 | # password: Topdraw1qaz | ||
89 | # # 虚拟空间 | ||
90 | # virtual-host: member_center | ||
91 | # # 如果对异步消息需要回调必须设置为true | ||
92 | # publisher-confirms: true | ||
93 | |||
94 | #是否允许生成代码,生产环境设置为false | ||
95 | generator: | ||
96 | enabled: false | ||
97 | |||
98 | #是否开启 swagger-ui | ||
99 | swagger: | ||
100 | enabled: true | ||
101 | |||
102 | 65 | ||
103 | ###########################################自定义属性################################################################# | 66 | ###########################################自定义属性################################################################# |
104 | # 多mq配置 | 67 | # 多mq配置 |
... | @@ -121,6 +84,7 @@ mutil-mq: | ... | @@ -121,6 +84,7 @@ mutil-mq: |
121 | username: guest # rabbitmq的用户名 | 84 | username: guest # rabbitmq的用户名 |
122 | password: guest # rabbitmq的密码 | 85 | password: guest # rabbitmq的密码 |
123 | publisher-confirms: true #如果对异步消息需要回调必须设置为true | 86 | publisher-confirms: true #如果对异步消息需要回调必须设置为true |
87 | startup: off | ||
124 | 88 | ||
125 | # 管理侧 | 89 | # 管理侧 |
126 | management: | 90 | management: |
... | @@ -135,54 +99,30 @@ mutil-mq: | ... | @@ -135,54 +99,30 @@ mutil-mq: |
135 | # # 虚拟空间 | 99 | # # 虚拟空间 |
136 | # virtual-host: member_center | 100 | # virtual-host: member_center |
137 | # ip | 101 | # ip |
138 | host: 139.196.145.150 | 102 | # host: 139.196.145.150 |
139 | # 端口 | 103 | # # 端口 |
140 | port: 5672 | 104 | # port: 5672 |
141 | # 用户名 | 105 | # # 用户名 |
142 | username: admin | 106 | # username: admin |
143 | # 密码 | 107 | # # 密码 |
144 | password: Topdraw1qaz | 108 | # password: Topdraw1qaz |
145 | # 虚拟空间 | 109 | # # 虚拟空间 |
146 | virtual-host: member_center | 110 | # virtual-host: member_center |
147 | 111 | host: 122.112.214.149 # rabbitmq的连接地址 | |
148 | #登录图形验证码有效时间/分钟 | 112 | port: 5672 # rabbitmq的连接端口号 |
149 | loginCode: | 113 | virtual-host: member_center # rabbitmq的虚拟hosthhh |
150 | expiration: 2 | 114 | username: guest # rabbitmq的用户名 |
115 | password: guest # rabbitmq的密码 | ||
116 | publisher-confirms: true #如果对异步消息需要回调必须设置为true | ||
117 | startup: on | ||
151 | 118 | ||
152 | # 服务属性 | 119 | # 服务属性 |
153 | service: | 120 | service: |
154 | # 服务域 mobile:小屏侧 vis:大屏侧 | ||
155 | area: vis | ||
156 | #平台类型 service: 服务侧 management: 管理侧 | 121 | #平台类型 service: 服务侧 management: 管理侧 |
157 | platform: service | 122 | platform: service |
123 | # 服务域 mobile:小屏侧 vis:大屏侧 | ||
124 | type: vis | ||
158 | 125 | ||
159 | # uc-engine服务地址 | 126 | # uc-engine服务地址 |
160 | api: | 127 | api: |
161 | baseUrl: http://127.0.0.1:8447 | ||
162 | |||
163 | # 线程池设置 | ||
164 | task: | ||
165 | pool: | ||
166 | # 核心线程池大小 | ||
167 | core-pool-size: 10 | ||
168 | # 最大线程数 | ||
169 | max-pool-size: 30 | ||
170 | # 活跃时间 | ||
171 | keep-alive-seconds: 60 | ||
172 | # 队列容量 | ||
173 | queue-capacity: 50 | ||
174 | |||
175 | #权限 jwt。依赖的common中有需要jwt的部分属性。 | ||
176 | jwt: | ||
177 | header: Authorization | ||
178 | secret: mySecret | ||
179 | # token 过期时间/毫秒,6小时 1小时 = 3600000 毫秒 | ||
180 | expiration: 7200000 | ||
181 | # 在线用户key | ||
182 | online: online-token | ||
183 | # 验证码 | ||
184 | codeKey: code-key | ||
185 | # token 续期检查时间范围(60分钟,单位毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期 | ||
186 | detect: 3600000 | ||
187 | # 续期时间,2小时,单位毫秒 | ||
188 | renew: 7200000 | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
128 | baseUrl: | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment