zhaoqiaobo
9 months ago
29 changed files with 822 additions and 10 deletions
@ -0,0 +1,22 @@
|
||||
package org.springblade.common.annotations; |
||||
|
||||
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
||||
import java.lang.annotation.Target; |
||||
|
||||
/** |
||||
* 特俗标记 |
||||
*/ |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
@Target({ ElementType.METHOD}) |
||||
public @interface LocalServerUser { |
||||
/**‘ |
||||
* 匹配值 |
||||
* factory:工厂系统 |
||||
* 6278683: 租户 |
||||
* factory-data: 租户 |
||||
* @return |
||||
*/ |
||||
String ds() default ""; |
||||
} |
@ -0,0 +1,67 @@
|
||||
package com.logpm.distribution.config; |
||||
|
||||
import cn.hutool.json.JSONUtil; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.utils.ThreadLocalUtil; |
||||
import org.springframework.amqp.core.Message; |
||||
import org.springframework.amqp.core.MessageProperties; |
||||
import org.springframework.amqp.support.converter.MessageConversionException; |
||||
import org.springframework.amqp.support.converter.MessageConverter; |
||||
import org.springframework.http.HttpHeaders; |
||||
import org.springframework.mock.web.MockHttpServletRequest; |
||||
import org.springframework.stereotype.Component; |
||||
import org.springframework.web.context.request.RequestContextHolder; |
||||
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author zhaoqiaobo |
||||
* @create 2024-05-08 |
||||
*/ |
||||
@Component |
||||
public class CustomMessageConverter implements MessageConverter { |
||||
private String name; |
||||
|
||||
@Override |
||||
public Message toMessage(Object o, MessageProperties messageProperties) throws MessageConversionException { |
||||
HttpHeaders headers = (HttpHeaders) ThreadLocalUtil.get("bladeContext"); |
||||
if (headers != null && !headers.isEmpty()) { |
||||
headers.forEach((key, values) -> { |
||||
values.forEach((value) -> { |
||||
messageProperties.setHeader(key, new String[]{value}); |
||||
}); |
||||
}); |
||||
} |
||||
BladeUser user = AuthUtil.getUser(); |
||||
BladeUser bladeUser = new BladeUser(); |
||||
bladeUser.setTenantId(user.getTenantId()); |
||||
bladeUser.setUserId(user.getUserId()); |
||||
bladeUser.setAccount(user.getAccount()); |
||||
bladeUser.setRoleId(user.getRoleId()); |
||||
messageProperties.setHeader("bladeUser", JSONUtil.toJsonStr(bladeUser)); |
||||
return new Message(o.toString().getBytes(), messageProperties); |
||||
} |
||||
|
||||
@Override |
||||
public Object fromMessage(Message message) throws MessageConversionException { |
||||
MessageProperties messageProperties = message.getMessageProperties(); |
||||
Map<String, Object> headers = messageProperties.getHeaders(); |
||||
ThreadLocalUtil.put("bladeContext", headers); |
||||
Object bladeUser = headers.get("bladeUser"); |
||||
MockHttpServletRequest request = new MockHttpServletRequest(); |
||||
BladeUser bladeUser1 = JSONUtil.toBean(bladeUser.toString(), BladeUser.class); |
||||
request.setAttribute("_BLADE_USER_REQUEST_ATTR_", bladeUser1); |
||||
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request)); |
||||
return new String(message.getBody()); |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,50 @@
|
||||
package com.logpm.factory.aspect; |
||||
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; |
||||
import org.aspectj.lang.ProceedingJoinPoint; |
||||
import org.aspectj.lang.annotation.Around; |
||||
import org.aspectj.lang.annotation.Aspect; |
||||
import org.aspectj.lang.reflect.MethodSignature; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.utils.StringUtil; |
||||
import org.springframework.scheduling.annotation.Async; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import java.lang.reflect.Method; |
||||
|
||||
@Aspect |
||||
@Component |
||||
public class AsyncAnnotationAspect { |
||||
|
||||
/** |
||||
* 该方法为一个切面,用于对标记了@RabbitListener注解的方法进行增强,主要增加了日志记录和数据源上下文处理的功能。 |
||||
* |
||||
* @param joinPoint 切面的连接点,表示当前被拦截的方法。 |
||||
* @return 返回被拦截方法的执行结果。 |
||||
* @throws Throwable 如果执行过程中发生异常,则抛出。 |
||||
*/ |
||||
@Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitListener)") |
||||
public Object rabbitMethods(ProceedingJoinPoint joinPoint) throws Throwable { |
||||
// 在方法执行前,获取当前租户ID并设置到数据源上下文中
|
||||
String tenantId = AuthUtil.getTenantId(); |
||||
DynamicDataSourceContextHolder.push(tenantId); |
||||
// 执行原方法
|
||||
Object result = joinPoint.proceed(); |
||||
// 在方法执行后,从数据源上下文中移除租户ID
|
||||
DynamicDataSourceContextHolder.poll(); |
||||
return result; |
||||
} |
||||
|
||||
@Around("@annotation(org.springframework.amqp.rabbit.annotation.RabbitHandler)") |
||||
public Object rabbitHandlerMethods(ProceedingJoinPoint joinPoint) throws Throwable { |
||||
// 在方法执行前,获取当前租户ID并设置到数据源上下文中
|
||||
String tenantId = AuthUtil.getTenantId(); |
||||
DynamicDataSourceContextHolder.push(tenantId); |
||||
// 执行原方法
|
||||
Object result = joinPoint.proceed(); |
||||
// 在方法执行后,从数据源上下文中移除租户ID
|
||||
DynamicDataSourceContextHolder.poll(); |
||||
return result; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,59 @@
|
||||
//package com.logpm.factory.aspect;
|
||||
//
|
||||
//import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
//import org.aspectj.lang.ProceedingJoinPoint;
|
||||
//import org.aspectj.lang.annotation.Around;
|
||||
//import org.aspectj.lang.annotation.Aspect;
|
||||
//import org.aspectj.lang.reflect.MethodSignature;
|
||||
//import org.springblade.common.annotations.LocalServerUser;
|
||||
//import org.springblade.core.secure.BladeUser;
|
||||
//import org.springblade.core.secure.utils.AuthUtil;
|
||||
//import org.springblade.core.tool.utils.StringUtil;
|
||||
//import org.springblade.core.tool.utils.WebUtil;
|
||||
//import org.springblade.system.cache.UserCache;
|
||||
//import org.springblade.system.entity.User;
|
||||
//import org.springframework.core.annotation.Order;
|
||||
//import org.springframework.scheduling.annotation.Async;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import java.lang.reflect.Method;
|
||||
//
|
||||
//@Aspect
|
||||
//@Component
|
||||
//public class LocalServerTenantIdAnnotationAspect {
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 定义一个切点,匹配所有带有@Async("asyncExecutor")注解的方法。
|
||||
// * 注意:实际上Spring Framework自带对@Async("asyncExecutor")的处理,直接这样配置可能会导致预期之外的行为。
|
||||
// */
|
||||
//
|
||||
// // 定义一个
|
||||
// @Around("@annotation(org.springblade.common.annotations.LocalServerUser)")
|
||||
// public Object logAroundAsyncMethods(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||
//
|
||||
// MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||
// Method method = signature.getMethod();
|
||||
//
|
||||
// LocalServerUser myAsync = method.getAnnotation(LocalServerUser.class);
|
||||
// String annotationValue = myAsync.ds();
|
||||
//
|
||||
// if(StringUtil.isNotBlank(annotationValue) ){
|
||||
// // 在方法执行前的操作
|
||||
// DynamicDataSourceContextHolder.push(annotationValue);
|
||||
//
|
||||
// // 执行原方法
|
||||
// Object result = joinPoint.proceed();
|
||||
//
|
||||
// // 在方法执行后的操作
|
||||
// DynamicDataSourceContextHolder.poll();
|
||||
//
|
||||
// return result;
|
||||
// }else{
|
||||
// return joinPoint.proceed();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
//}
|
@ -0,0 +1,67 @@
|
||||
package com.logpm.factory.config; |
||||
|
||||
import cn.hutool.json.JSONUtil; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.utils.ThreadLocalUtil; |
||||
import org.springframework.amqp.core.Message; |
||||
import org.springframework.amqp.core.MessageProperties; |
||||
import org.springframework.amqp.support.converter.MessageConversionException; |
||||
import org.springframework.amqp.support.converter.MessageConverter; |
||||
import org.springframework.http.HttpHeaders; |
||||
import org.springframework.mock.web.MockHttpServletRequest; |
||||
import org.springframework.stereotype.Component; |
||||
import org.springframework.web.context.request.RequestContextHolder; |
||||
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author zhaoqiaobo |
||||
* @create 2024-05-08 |
||||
*/ |
||||
@Component |
||||
public class CustomMessageConverter implements MessageConverter { |
||||
private String name; |
||||
|
||||
@Override |
||||
public Message toMessage(Object o, MessageProperties messageProperties) throws MessageConversionException { |
||||
HttpHeaders headers = (HttpHeaders) ThreadLocalUtil.get("bladeContext"); |
||||
if (headers != null && !headers.isEmpty()) { |
||||
headers.forEach((key, values) -> { |
||||
values.forEach((value) -> { |
||||
messageProperties.setHeader(key, new String[]{value}); |
||||
}); |
||||
}); |
||||
} |
||||
BladeUser user = AuthUtil.getUser(); |
||||
BladeUser bladeUser = new BladeUser(); |
||||
bladeUser.setTenantId(user.getTenantId()); |
||||
bladeUser.setUserId(user.getUserId()); |
||||
bladeUser.setAccount(user.getAccount()); |
||||
bladeUser.setRoleId(user.getRoleId()); |
||||
messageProperties.setHeader("bladeUser", JSONUtil.toJsonStr(bladeUser)); |
||||
return new Message(o.toString().getBytes(), messageProperties); |
||||
} |
||||
|
||||
@Override |
||||
public Object fromMessage(Message message) throws MessageConversionException { |
||||
MessageProperties messageProperties = message.getMessageProperties(); |
||||
Map<String, Object> headers = messageProperties.getHeaders(); |
||||
ThreadLocalUtil.put("bladeContext", headers); |
||||
Object bladeUser = headers.get("bladeUser"); |
||||
MockHttpServletRequest request = new MockHttpServletRequest(); |
||||
BladeUser bladeUser1 = JSONUtil.toBean(bladeUser.toString(), BladeUser.class); |
||||
request.setAttribute("_BLADE_USER_REQUEST_ATTR_", bladeUser1); |
||||
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request)); |
||||
return new String(message.getBody()); |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,100 @@
|
||||
package com.logpm.factory.interceptor; |
||||
|
||||
import cn.hutool.core.map.MapUtil; |
||||
import cn.hutool.http.HttpRequest; |
||||
import cn.hutool.http.HttpResponse; |
||||
import cn.hutool.http.HttpUtil; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.logpm.factory.comfac.service.IFactoryTokenService; |
||||
import com.logpm.factory.config.RequestWrapper; |
||||
import com.logpm.factory.wrapper.CustomHttpServletRequestWrapper; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.log4j.Log4j2; |
||||
import org.springblade.common.cache.CacheNames; |
||||
import org.springblade.common.constant.LauncherConstant; |
||||
import org.springblade.common.exception.CustomerException; |
||||
import org.springblade.core.launch.constant.AppConstant; |
||||
import org.springblade.core.redis.cache.BladeRedis; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.StringUtil; |
||||
import org.springframework.web.context.request.RequestContextHolder; |
||||
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
import org.springframework.web.servlet.HandlerInterceptor; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.io.IOException; |
||||
import java.io.PrintWriter; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
import java.util.Objects; |
||||
|
||||
@Log4j2 |
||||
@AllArgsConstructor |
||||
public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapter { |
||||
|
||||
private final BladeRedis bladeRedis; |
||||
|
||||
@Override |
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws CustomerException { |
||||
|
||||
|
||||
try { |
||||
JSONObject data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+"admin"); |
||||
CustomHttpServletRequestWrapper wrappedRequest = new CustomHttpServletRequestWrapper(request); |
||||
if(Objects.isNull(data)){ |
||||
String url = "http://"+ LauncherConstant.loginAddr(AppConstant.DEV_CODE)+"/blade-auth/oauth/token"; |
||||
cn.hutool.http.HttpRequest urlRequest = HttpRequest.post(url); |
||||
urlRequest.header("Authorization", "Basic c2FiZXI6c2FiZXJfc2VjcmV0"); |
||||
urlRequest.header("Tenant-Id", "627683"); |
||||
|
||||
Map<String, Object> params = new HashMap<>(); |
||||
params.put("grant_type", "local_server"); |
||||
params.put("scope", "all"); |
||||
params.put("username", "shujutongbu"); |
||||
params.put("tenantId", "627683"); |
||||
HttpResponse execute = urlRequest.form(params).execute(); |
||||
String body = execute.body(); |
||||
data = JSONObject.parseObject(body); |
||||
bladeRedis.setEx(CacheNames.LOCAL_SERVER_USER+"admin",data,3200L); |
||||
} |
||||
|
||||
// 修改或添加header
|
||||
|
||||
// 发送登录请求
|
||||
log.info("##########preHandle: request={}", request); |
||||
|
||||
wrappedRequest.addHeader("Blade-Auth", "bearer "+data.getString("access_token")); |
||||
|
||||
// 用包装后的request替换原始request
|
||||
request = wrappedRequest; |
||||
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request)); |
||||
return true; |
||||
} catch (Exception e) { |
||||
returnJson(response, JSONObject.toJSONString(R.fail(500, "服务异常,请联系管理员"))); |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
private void returnJson(HttpServletResponse response, String json) { |
||||
PrintWriter writer = null; |
||||
response.setCharacterEncoding("UTF-8"); |
||||
response.setContentType("application/json"); |
||||
try { |
||||
writer = response.getWriter(); |
||||
writer.print(json); |
||||
|
||||
} catch (IOException e) { |
||||
System.out.println(e.getMessage()); |
||||
} finally { |
||||
if (writer != null) { |
||||
writer.close(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,36 @@
|
||||
package com.logpm.factory.wrapper; |
||||
|
||||
import org.springframework.http.HttpHeaders; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletRequestWrapper; |
||||
import java.util.*; |
||||
|
||||
public class CustomHttpServletRequestWrapper extends HttpServletRequestWrapper { |
||||
|
||||
private final HttpHeaders headers; |
||||
|
||||
public CustomHttpServletRequestWrapper(HttpServletRequest request) { |
||||
super(request); |
||||
headers = new HttpHeaders(); |
||||
} |
||||
|
||||
@Override |
||||
public String getHeader(String name) { |
||||
String headerValue = headers.getFirst(name); |
||||
return headerValue != null ? headerValue : super.getHeader(name); |
||||
} |
||||
|
||||
@Override |
||||
public Enumeration<String> getHeaderNames() { |
||||
List<String> names = Collections.list(super.getHeaderNames()); |
||||
headers.forEach((key, value) -> names.add(key)); |
||||
return Collections.enumeration(names); |
||||
} |
||||
|
||||
// 其他需要覆盖的方法...
|
||||
|
||||
public void addHeader(String name, String value) { |
||||
headers.add(name, value); |
||||
} |
||||
} |
@ -0,0 +1,67 @@
|
||||
package com.logpm.trunkline.config; |
||||
|
||||
import cn.hutool.json.JSONUtil; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.utils.ThreadLocalUtil; |
||||
import org.springframework.amqp.core.Message; |
||||
import org.springframework.amqp.core.MessageProperties; |
||||
import org.springframework.amqp.support.converter.MessageConversionException; |
||||
import org.springframework.amqp.support.converter.MessageConverter; |
||||
import org.springframework.http.HttpHeaders; |
||||
import org.springframework.mock.web.MockHttpServletRequest; |
||||
import org.springframework.stereotype.Component; |
||||
import org.springframework.web.context.request.RequestContextHolder; |
||||
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author zhaoqiaobo |
||||
* @create 2024-05-08 |
||||
*/ |
||||
@Component |
||||
public class CustomMessageConverter implements MessageConverter { |
||||
private String name; |
||||
|
||||
@Override |
||||
public Message toMessage(Object o, MessageProperties messageProperties) throws MessageConversionException { |
||||
HttpHeaders headers = (HttpHeaders) ThreadLocalUtil.get("bladeContext"); |
||||
if (headers != null && !headers.isEmpty()) { |
||||
headers.forEach((key, values) -> { |
||||
values.forEach((value) -> { |
||||
messageProperties.setHeader(key, new String[]{value}); |
||||
}); |
||||
}); |
||||
} |
||||
BladeUser user = AuthUtil.getUser(); |
||||
BladeUser bladeUser = new BladeUser(); |
||||
bladeUser.setTenantId(user.getTenantId()); |
||||
bladeUser.setUserId(user.getUserId()); |
||||
bladeUser.setAccount(user.getAccount()); |
||||
bladeUser.setRoleId(user.getRoleId()); |
||||
messageProperties.setHeader("bladeUser", JSONUtil.toJsonStr(bladeUser)); |
||||
return new Message(o.toString().getBytes(), messageProperties); |
||||
} |
||||
|
||||
@Override |
||||
public Object fromMessage(Message message) throws MessageConversionException { |
||||
MessageProperties messageProperties = message.getMessageProperties(); |
||||
Map<String, Object> headers = messageProperties.getHeaders(); |
||||
ThreadLocalUtil.put("bladeContext", headers); |
||||
Object bladeUser = headers.get("bladeUser"); |
||||
MockHttpServletRequest request = new MockHttpServletRequest(); |
||||
BladeUser bladeUser1 = JSONUtil.toBean(bladeUser.toString(), BladeUser.class); |
||||
request.setAttribute("_BLADE_USER_REQUEST_ATTR_", bladeUser1); |
||||
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request)); |
||||
return new String(message.getBody()); |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
@ -0,0 +1,67 @@
|
||||
package com.logpm.warehouse.config; |
||||
|
||||
import cn.hutool.json.JSONUtil; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.utils.ThreadLocalUtil; |
||||
import org.springframework.amqp.core.Message; |
||||
import org.springframework.amqp.core.MessageProperties; |
||||
import org.springframework.amqp.support.converter.MessageConversionException; |
||||
import org.springframework.amqp.support.converter.MessageConverter; |
||||
import org.springframework.http.HttpHeaders; |
||||
import org.springframework.mock.web.MockHttpServletRequest; |
||||
import org.springframework.stereotype.Component; |
||||
import org.springframework.web.context.request.RequestContextHolder; |
||||
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author zhaoqiaobo |
||||
* @create 2024-05-08 |
||||
*/ |
||||
@Component |
||||
public class CustomMessageConverter implements MessageConverter { |
||||
private String name; |
||||
|
||||
@Override |
||||
public Message toMessage(Object o, MessageProperties messageProperties) throws MessageConversionException { |
||||
HttpHeaders headers = (HttpHeaders) ThreadLocalUtil.get("bladeContext"); |
||||
if (headers != null && !headers.isEmpty()) { |
||||
headers.forEach((key, values) -> { |
||||
values.forEach((value) -> { |
||||
messageProperties.setHeader(key, new String[]{value}); |
||||
}); |
||||
}); |
||||
} |
||||
BladeUser user = AuthUtil.getUser(); |
||||
BladeUser bladeUser = new BladeUser(); |
||||
bladeUser.setTenantId(user.getTenantId()); |
||||
bladeUser.setUserId(user.getUserId()); |
||||
bladeUser.setAccount(user.getAccount()); |
||||
bladeUser.setRoleId(user.getRoleId()); |
||||
messageProperties.setHeader("bladeUser", JSONUtil.toJsonStr(bladeUser)); |
||||
return new Message(o.toString().getBytes(), messageProperties); |
||||
} |
||||
|
||||
@Override |
||||
public Object fromMessage(Message message) throws MessageConversionException { |
||||
MessageProperties messageProperties = message.getMessageProperties(); |
||||
Map<String, Object> headers = messageProperties.getHeaders(); |
||||
ThreadLocalUtil.put("bladeContext", headers); |
||||
Object bladeUser = headers.get("bladeUser"); |
||||
MockHttpServletRequest request = new MockHttpServletRequest(); |
||||
BladeUser bladeUser1 = JSONUtil.toBean(bladeUser.toString(), BladeUser.class); |
||||
request.setAttribute("_BLADE_USER_REQUEST_ATTR_", bladeUser1); |
||||
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request)); |
||||
return new String(message.getBody()); |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
Loading…
Reference in new issue