This commit is contained in:
crusader 2018-06-20 20:44:07 +09:00
parent 343b2f1f58
commit 65e10cfc1a
2 changed files with 10 additions and 4 deletions

View File

@ -246,6 +246,8 @@ public class CentralInfraService implements InfraService {
infraHostPort = this.infraHostPortService.regist(infraHostPort);
com.loafle.overflow.model.infra.InfraService infraService = new com.loafle.overflow.model.infra.InfraService();
infraService.setMetaInfraType(MetaInfraType.Enum.SERVICE.to());
infraService.setProbe(probe);
infraService.setInfraHostPort(infraHostPort);
infraService.setMetaCryptoType(metaCryptoType);

View File

@ -1,11 +1,12 @@
package com.loafle.overflow.central.proxy;
import com.google.gson.internal.Primitives;
import com.google.protobuf.ByteString;
import com.loafle.overflow.core.exception.OverflowException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.JavaType;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
@ -76,8 +77,8 @@ public class ServiceInvoker {
}
private Method getMethod(String methodName) {
// Class<?> clazz = AopUtils.getTargetClass(serviceCache.bean);
Class<?> clazz = serviceCache.bean.getClass();
Class<?> clazz = AopUtils.getTargetClass(serviceCache.bean);
// Class<?> clazz = serviceCache.bean.getClass();
Method[] methods = clazz.getMethods();
Method targetMethod = null;
@ -120,7 +121,10 @@ public class ServiceInvoker {
private Object getValue(Type parameterType, String json) throws IllegalArgumentException {
JavaType targetType = objectMapper.getTypeFactory().constructType(parameterType);
if (!Primitives.isPrimitive(parameterType) && !parameterType.getTypeName().equals(String.class.getName())) {
if (!targetType.isPrimitive() && !parameterType.getTypeName().equals(String.class.getName())) {
// if (!Primitives.isPrimitive(parameterType) &&
// !parameterType.getTypeName().equals(String.class.getName())) {
try {
return objectMapper.readValue(json, targetType);
} catch (IOException e) {