feat: 升级SpringBoot和SpringCloud版本
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-dubbo</artifactId>
|
||||
<version>2021.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
package com.rocketmq.demo.config;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||
import org.springframework.cloud.stream.annotation.Input;
|
||||
import com.rocketmq.demo.config.RocketMqConfig.MySink;
|
||||
import org.springframework.cloud.stream.messaging.Sink;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
*/
|
||||
@EnableBinding({MySink.class})
|
||||
public class RocketMqConfig {
|
||||
public interface MySink {
|
||||
@Input(Sink.INPUT)
|
||||
SubscribableChannel input();
|
||||
|
||||
@Input("input2")
|
||||
SubscribableChannel input2();
|
||||
|
||||
@Input("input3")
|
||||
SubscribableChannel input3();
|
||||
}
|
||||
}
|
||||
+15
-15
@@ -2,38 +2,38 @@ package com.rocketmq.demo.service;
|
||||
|
||||
import com.rocketmq.demo.model.Order;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.StreamListener;
|
||||
import org.springframework.cloud.stream.messaging.Sink;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.handler.annotation.Payload;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
*/
|
||||
@Service
|
||||
@Configuration
|
||||
public class ReceiveService {
|
||||
/**
|
||||
* 字符串消息
|
||||
*/
|
||||
@StreamListener(Sink.INPUT)
|
||||
public void receiveInput(String receiveMsg) {
|
||||
System.out.println("input receive: " + receiveMsg);
|
||||
@Bean
|
||||
public Consumer<String> receiveInput() {
|
||||
return receiveMsg -> System.out.println("input receive: " + receiveMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象消息
|
||||
*/
|
||||
@StreamListener("input2")
|
||||
public void receiveInput2(@Payload Order order) {
|
||||
System.out.println("input2 receive: " + order);
|
||||
@Bean
|
||||
public Consumer<Order> receiveInput2() {
|
||||
return order -> System.out.println("input2 receive: " + order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过spring.messaging对象来接收消息
|
||||
*/
|
||||
@StreamListener("input3")
|
||||
public void receiveInput3(Message msg) {
|
||||
System.out.println("input3 receive: " + msg);
|
||||
}
|
||||
@Bean
|
||||
public Consumer<Message<String>> receiveInput3() {
|
||||
return msg -> System.out.println("input3 receive: " + msg);
|
||||
}
|
||||
}
|
||||
@@ -6,34 +6,35 @@ spring:
|
||||
name: rocketmq-produce
|
||||
cloud:
|
||||
stream:
|
||||
rocketmq:
|
||||
binder:
|
||||
# RocketMQ 服务器地址
|
||||
name-server: 192.168.28.130:9876
|
||||
bindings:
|
||||
input2:
|
||||
consumer:
|
||||
#增加tag过滤
|
||||
tags: tagObj
|
||||
function:
|
||||
definition: receiveInput;receiveInput2;receiveInput3
|
||||
bindings:
|
||||
input:
|
||||
receiveInput-in-0:
|
||||
destination: test-topic
|
||||
content-type: text/plain
|
||||
group: consume-group1
|
||||
consumer:
|
||||
#并发消费线程数
|
||||
concurrency: 20
|
||||
input2:
|
||||
receiveInput2-in-0:
|
||||
destination: test-topic
|
||||
content-type: application/json
|
||||
group: consume-group2
|
||||
consumer:
|
||||
#并发消费线程数
|
||||
concurrency: 20
|
||||
input3:
|
||||
receiveInput3-in-0:
|
||||
destination: test-topic
|
||||
content-type: text/plain
|
||||
group: consume-group3
|
||||
consumer:
|
||||
#并发消费线程数
|
||||
concurrency: 20
|
||||
concurrency: 20
|
||||
rocketmq:
|
||||
binder:
|
||||
# RocketMQ 服务器地址
|
||||
name-server: 192.168.28.130:9876
|
||||
|
||||
logging:
|
||||
level:
|
||||
org.springframework.context.support: debug
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
package com.rocketmq.demo.config;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||
import org.springframework.cloud.stream.annotation.Output;
|
||||
import com.rocketmq.demo.config.RocketMqConfig.MySource;
|
||||
import org.springframework.cloud.stream.messaging.Source;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
|
||||
/**
|
||||
* 配置消息生产者
|
||||
*
|
||||
* @author zlt
|
||||
*/
|
||||
@EnableBinding({MySource.class})
|
||||
public class RocketMqConfig {
|
||||
public interface MySource {
|
||||
@Output(Source.OUTPUT)
|
||||
MessageChannel output();
|
||||
}
|
||||
}
|
||||
+10
-7
@@ -1,37 +1,40 @@
|
||||
package com.rocketmq.demo.service;
|
||||
|
||||
import org.apache.rocketmq.common.message.MessageConst;
|
||||
import com.rocketmq.demo.config.RocketMqConfig.MySource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.stream.function.StreamBridge;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.MimeTypeUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
*/
|
||||
@Service
|
||||
public class SenderService {
|
||||
@Autowired
|
||||
private MySource source;
|
||||
private final static String TEST_OUT = "test-out-0";
|
||||
|
||||
@Resource
|
||||
private StreamBridge streamBridge;
|
||||
|
||||
/**
|
||||
* 发送字符消息
|
||||
*/
|
||||
public void send(String msg) {
|
||||
source.output().send(MessageBuilder.withPayload(msg).build());
|
||||
streamBridge.send(TEST_OUT, MessageBuilder.withPayload(msg).build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送带tag的对象消息
|
||||
*/
|
||||
public <T> void sendWithTags(T msg, String tag) {
|
||||
Message message = MessageBuilder.withPayload(msg)
|
||||
Message<T> message = MessageBuilder.withPayload(msg)
|
||||
.setHeader(MessageConst.PROPERTY_TAGS, tag)
|
||||
.setHeader(MessageHeaders.CONTENT_TYPE, MimeTypeUtils.APPLICATION_JSON)
|
||||
.build();
|
||||
source.output().send(message);
|
||||
streamBridge.send(TEST_OUT, message);
|
||||
}
|
||||
}
|
||||
@@ -6,27 +6,16 @@ spring:
|
||||
name: rocketmq-produce
|
||||
cloud:
|
||||
stream:
|
||||
bindings:
|
||||
test-out-0:
|
||||
destination: test-topic
|
||||
content-type: application/json
|
||||
group: produce-group
|
||||
rocketmq:
|
||||
binder:
|
||||
# RocketMQ 服务地址
|
||||
name-server: 192.168.28.130:9876
|
||||
bindings:
|
||||
output:
|
||||
producer:
|
||||
group: produce-group
|
||||
output2:
|
||||
producer:
|
||||
group: test-group2
|
||||
bindings:
|
||||
output:
|
||||
destination: test-topic
|
||||
content-type: application/json
|
||||
|
||||
logging:
|
||||
level:
|
||||
org:
|
||||
springframework:
|
||||
cloud:
|
||||
stream:
|
||||
binder:
|
||||
rocketmq: DEBUG
|
||||
org.springframework.context.support: debug
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
package com.rocketmq.demo.config;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||
import org.springframework.cloud.stream.annotation.Input;
|
||||
import org.springframework.cloud.stream.messaging.Sink;
|
||||
import org.springframework.cloud.stream.messaging.Source;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
import com.rocketmq.demo.config.RocketMqConfig.MySink;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
*/
|
||||
@EnableBinding({ Source.class, MySink.class })
|
||||
public class RocketMqConfig {
|
||||
public interface MySink {
|
||||
@Input(Sink.INPUT)
|
||||
SubscribableChannel input();
|
||||
|
||||
@Input("inputDlq")
|
||||
SubscribableChannel inputDlq();
|
||||
}
|
||||
}
|
||||
+11
-12
@@ -3,8 +3,7 @@ package com.rocketmq.demo.controller;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.central.common.utils.IdGenerator;
|
||||
import com.rocketmq.demo.model.Order;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.stream.messaging.Source;
|
||||
import org.springframework.cloud.stream.function.StreamBridge;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -15,11 +14,11 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
public class OrderController {
|
||||
private final Source source;
|
||||
private final static String ORDER_OUT = "order-out-0";
|
||||
private final StreamBridge streamBridge;
|
||||
|
||||
@Autowired
|
||||
public OrderController(Source source) {
|
||||
this.source = source;
|
||||
public OrderController(StreamBridge streamBridge) {
|
||||
this.streamBridge = streamBridge;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,12 +30,12 @@ public class OrderController {
|
||||
order.setOrderId(IdGenerator.getId());
|
||||
order.setOrderNo(RandomUtil.randomString(4));
|
||||
|
||||
Message message = MessageBuilder
|
||||
Message<Order> message = MessageBuilder
|
||||
.withPayload(order)
|
||||
.setHeader("orderId", order.getOrderId())
|
||||
.build();
|
||||
//发送半消息
|
||||
source.output().send(message);
|
||||
streamBridge.send(ORDER_OUT, message);
|
||||
return "下单成功";
|
||||
}
|
||||
|
||||
@@ -49,13 +48,13 @@ public class OrderController {
|
||||
order.setOrderId(IdGenerator.getId());
|
||||
order.setOrderNo(RandomUtil.randomString(4));
|
||||
|
||||
Message message = MessageBuilder
|
||||
Message<Order> message = MessageBuilder
|
||||
.withPayload(order)
|
||||
.setHeader("orderId", order.getOrderId())
|
||||
.setHeader("produceError", "1")
|
||||
.build();
|
||||
//发送半消息
|
||||
source.output().send(message);
|
||||
streamBridge.send(ORDER_OUT, message);
|
||||
return "发送消息失败";
|
||||
}
|
||||
|
||||
@@ -68,13 +67,13 @@ public class OrderController {
|
||||
order.setOrderId(IdGenerator.getId());
|
||||
order.setOrderNo(RandomUtil.randomString(4));
|
||||
|
||||
Message message = MessageBuilder
|
||||
Message<Order> message = MessageBuilder
|
||||
.withPayload(order)
|
||||
.setHeader("orderId", order.getOrderId())
|
||||
.setHeader("consumeError", "1")
|
||||
.build();
|
||||
//发送半消息
|
||||
source.output().send(message);
|
||||
streamBridge.send(ORDER_OUT, message);
|
||||
return "消费消息失败";
|
||||
}
|
||||
}
|
||||
|
||||
+16
-15
@@ -3,31 +3,32 @@ package com.rocketmq.demo.listener;
|
||||
import com.central.common.utils.JsonUtil;
|
||||
import com.rocketmq.demo.model.Order;
|
||||
import com.rocketmq.demo.service.IOrderService;
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQTransactionListener;
|
||||
import org.apache.rocketmq.spring.core.RocketMQLocalTransactionListener;
|
||||
import org.apache.rocketmq.spring.core.RocketMQLocalTransactionState;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.messaging.Message;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.rocketmq.client.producer.LocalTransactionState;
|
||||
import org.apache.rocketmq.client.producer.TransactionListener;
|
||||
import org.apache.rocketmq.common.message.Message;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author zlt
|
||||
*/
|
||||
@RocketMQTransactionListener(txProducerGroup = "order-tx-produce-group", corePoolSize = 5, maximumPoolSize = 10)
|
||||
public class OrderTransactionListenerImpl implements RocketMQLocalTransactionListener {
|
||||
@Autowired
|
||||
@Component("myTransactionListener")
|
||||
public class OrderTransactionListenerImpl implements TransactionListener {
|
||||
@Resource
|
||||
private IOrderService orderService;
|
||||
|
||||
/**
|
||||
* 提交本地事务
|
||||
*/
|
||||
@Override
|
||||
public RocketMQLocalTransactionState executeLocalTransaction(Message message, Object arg) {
|
||||
public LocalTransactionState executeLocalTransaction(Message message, Object arg) {
|
||||
//插入订单数据
|
||||
String orderJson = new String(((byte[])message.getPayload()));
|
||||
String orderJson = new String((message.getBody()));
|
||||
Order order = JsonUtil.toObject(orderJson, Order.class);
|
||||
orderService.save(order);
|
||||
|
||||
String produceError = (String)message.getHeaders().get("produceError");
|
||||
String produceError = message.getProperty("produceError");
|
||||
if ("1".equals(produceError)) {
|
||||
System.err.println("============Exception:订单进程挂了,事务消息没提交");
|
||||
//模拟插入订单后服务器挂了,没有commit事务消息
|
||||
@@ -35,7 +36,7 @@ public class OrderTransactionListenerImpl implements RocketMQLocalTransactionLis
|
||||
}
|
||||
|
||||
//提交事务消息
|
||||
return RocketMQLocalTransactionState.COMMIT;
|
||||
return LocalTransactionState.COMMIT_MESSAGE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,13 +47,13 @@ public class OrderTransactionListenerImpl implements RocketMQLocalTransactionLis
|
||||
* 否:回滚事务消息
|
||||
*/
|
||||
@Override
|
||||
public RocketMQLocalTransactionState checkLocalTransaction(Message message) {
|
||||
String orderId = (String)message.getHeaders().get("orderId");
|
||||
public LocalTransactionState checkLocalTransaction(MessageExt message) {
|
||||
String orderId = message.getProperty("orderId");
|
||||
System.out.println("============事务回查-orderId:" + orderId);
|
||||
//判断之前的事务是否已经提交:订单记录是否已经保存
|
||||
int count = 1;
|
||||
//select count(1) from t_order where order_id = ${orderId}
|
||||
System.out.println("============事务回查-订单已生成-提交事务消息");
|
||||
return count > 0 ? RocketMQLocalTransactionState.COMMIT : RocketMQLocalTransactionState.ROLLBACK;
|
||||
return count > 0 ? LocalTransactionState.COMMIT_MESSAGE : LocalTransactionState.ROLLBACK_MESSAGE;
|
||||
}
|
||||
}
|
||||
+24
-18
@@ -1,36 +1,42 @@
|
||||
package com.rocketmq.demo.service.impl;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.StreamListener;
|
||||
import org.springframework.cloud.stream.messaging.Sink;
|
||||
import com.rocketmq.demo.model.Order;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* 积分服务的消费者,接收到下单成功后增加积分
|
||||
*
|
||||
* @author zlt
|
||||
*/
|
||||
@Service
|
||||
@Configuration
|
||||
public class IntegralReceiveService {
|
||||
@StreamListener(Sink.INPUT)
|
||||
public void receive(Message message) {
|
||||
//模拟消费异常
|
||||
String consumeError = (String)message.getHeaders().get("consumeError");
|
||||
if ("1".equals(consumeError)) {
|
||||
System.err.println("============Exception:积分进程挂了,消费消息失败");
|
||||
//模拟插入订单后服务器挂了,没有commit事务消息
|
||||
throw new RuntimeException("积分服务器挂了");
|
||||
}
|
||||
@Bean
|
||||
public Consumer<Message<Order>> receive() {
|
||||
return message -> {
|
||||
//模拟消费异常
|
||||
String consumeError = (String)message.getHeaders().get("consumeError");
|
||||
if ("1".equals(consumeError)) {
|
||||
System.err.println("============Exception:积分进程挂了,消费消息失败");
|
||||
//模拟插入订单后服务器挂了,没有commit事务消息
|
||||
throw new RuntimeException("积分服务器挂了");
|
||||
}
|
||||
|
||||
System.out.println("============收到订单信息,增加积分:" + message);
|
||||
System.out.println("============收到订单信息,增加积分:" + message);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 消费死信队列
|
||||
*/
|
||||
@StreamListener("inputDlq")
|
||||
public void receiveDlq(Message message) {
|
||||
String orderId = (String)message.getHeaders().get("orderId");
|
||||
System.err.println("============消费死信队列消息,记录日志并预警:" + orderId);
|
||||
@Bean
|
||||
public Consumer<Message<Order>> receiveDlq() {
|
||||
return message -> {
|
||||
String orderId = (String)message.getHeaders().get("orderId");
|
||||
System.err.println("============消费死信队列消息,记录日志并预警:" + orderId);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,27 +6,16 @@ spring:
|
||||
name: rocketmq-tx
|
||||
cloud:
|
||||
stream:
|
||||
rocketmq:
|
||||
binder:
|
||||
# RocketMQ 服务器地址
|
||||
name-server: 192.168.28.130:9876
|
||||
bindings:
|
||||
output:
|
||||
producer:
|
||||
group: order-tx-produce-group
|
||||
#开启事务消息
|
||||
transactional: true
|
||||
input:
|
||||
consumer:
|
||||
#重试失败直接进入死信队列
|
||||
delayLevelWhenNextConsume: -1
|
||||
function:
|
||||
definition: receive;receiveDlq
|
||||
bindings:
|
||||
# 生产者
|
||||
output:
|
||||
order-out-0:
|
||||
destination: TransactionTopic
|
||||
content-type: application/json
|
||||
group: order-tx-produce-group
|
||||
# 消费者
|
||||
input:
|
||||
receive-in-0:
|
||||
destination: TransactionTopic
|
||||
content-type: application/json
|
||||
group: order-tx-consume-group
|
||||
@@ -35,18 +24,27 @@ spring:
|
||||
concurrency: 20
|
||||
#重试1次
|
||||
maxAttempts: 2
|
||||
inputDlq:
|
||||
destination: '%DLQ%${spring.cloud.stream.bindings.input.group}'
|
||||
receiveDlq-in-0:
|
||||
destination: '%DLQ%${spring.cloud.stream.bindings.receive-in-0.group}'
|
||||
content-type: application/json
|
||||
group: order-dlq-group
|
||||
consumer:
|
||||
concurrency: 20
|
||||
rocketmq:
|
||||
binder:
|
||||
# RocketMQ 服务器地址
|
||||
name-server: 192.168.28.130:9876
|
||||
bindings:
|
||||
order-out-0:
|
||||
producer:
|
||||
#开启事务消息
|
||||
transactionListener: myTransactionListener
|
||||
producerType: Trans
|
||||
receive-in-0:
|
||||
consumer:
|
||||
#重试失败直接进入死信队列
|
||||
delayLevelWhenNextConsume: -1
|
||||
|
||||
logging:
|
||||
level:
|
||||
org:
|
||||
springframework:
|
||||
cloud:
|
||||
stream:
|
||||
binder:
|
||||
rocketmq: DEBUG
|
||||
org.springframework.context.support: debug
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.interfaces.RSAPublicKey;
|
||||
import java.util.*;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.sso.demo.config;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -21,16 +22,16 @@ import javax.annotation.Resource;
|
||||
*/
|
||||
@EnableOAuth2Sso
|
||||
@Configuration
|
||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
public class SecurityConfig {
|
||||
@Value("${security.oauth2.sso.login-path:}")
|
||||
private String loginPath;
|
||||
|
||||
@Resource
|
||||
private LogoutSuccessHandler ssoLogoutSuccessHandler;
|
||||
|
||||
@Override
|
||||
public void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests().anyRequest().authenticated()
|
||||
@Bean
|
||||
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||
http.authorizeHttpRequests().anyRequest().authenticated()
|
||||
.and()
|
||||
.csrf().disable()
|
||||
.logout()
|
||||
@@ -38,5 +39,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
if (StrUtil.isNotEmpty(loginPath)) {
|
||||
http.formLogin().loginProcessingUrl(loginPath);
|
||||
}
|
||||
return http.build();
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -9,8 +9,8 @@ import org.springframework.security.web.RedirectStrategy;
|
||||
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package org.zlt.controller;
|
||||
|
||||
import com.central.oauth2.common.config.WcAuthConfigurator;
|
||||
import jakarta.websocket.OnOpen;
|
||||
import jakarta.websocket.Session;
|
||||
import jakarta.websocket.server.ServerEndpoint;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.websocket.OnOpen;
|
||||
import javax.websocket.Session;
|
||||
import javax.websocket.server.ServerEndpoint;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user