master
gaojie 2019-02-26 11:52:26 +08:00
parent 496da0a54d
commit 630968b0de
7 changed files with 15 additions and 22 deletions

View File

@ -31,7 +31,7 @@ public class Application {
//redis初始化 //redis初始化
RedisAutoConfiguration redisAutoConfiguration = configurableApplicationContext.getBean(RedisAutoConfiguration.class); RedisAutoConfiguration redisAutoConfiguration = configurableApplicationContext.getBean(RedisAutoConfiguration.class);
RedisUtil.getInstence().init(redisAutoConfiguration.getRedisProperties()); RedisUtil.getInstence().init(redisAutoConfiguration.getRedisProperties());
JsonUtil.getInstence().initServerIPandProt(); // JsonUtil.getInstence().initServerIPandProt();
// Map<String, BaseHandler> commandHanderMap = configurableApplicationContext.getBeansOfType(BaseHandler.class); // Map<String, BaseHandler> commandHanderMap = configurableApplicationContext.getBeansOfType(BaseHandler.class);
// for (BaseHandler handler : commandHanderMap.values()){ // for (BaseHandler handler : commandHanderMap.values()){
// handlerManager.addHandler(handler); // handlerManager.addHandler(handler);

View File

@ -12,7 +12,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import sun.security.provider.MD5;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;

View File

@ -2,7 +2,6 @@ package com.jmfy.controller;
import com.jmfy.dto.*; import com.jmfy.dto.*;
import com.jmfy.thrift.idl.RPCRequestIFace; import com.jmfy.thrift.idl.RPCRequestIFace;
import com.jmfy.thrift.idl.Result;
import com.jmfy.thrift.pool.ClientAdapterPo; import com.jmfy.thrift.pool.ClientAdapterPo;
import com.jmfy.thrift.pool.ServiceKey; import com.jmfy.thrift.pool.ServiceKey;
import com.jmfy.util.JsonUtil; import com.jmfy.util.JsonUtil;
@ -15,11 +14,8 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
@RestController @RestController
public class SendMailController { public class SendMailController {

View File

@ -7,14 +7,12 @@ import com.jmfy.util.YsjConstant;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -49,7 +47,7 @@ public class UserController {
} }
public static void main (String [] args){ public static void main (String [] args){
String s = MD5Util.encrypByMd5(YsjConstant.TW_GameKey + "111111" + 10212); String s = MD5Util.encrypByMd5(YsjConstant.TW_GameKey + "9000709253" + 10074);
System.out.println(s); System.out.println(s);
} }
} }

View File

@ -80,14 +80,14 @@ public class JsonUtil {
return dayBefore; return dayBefore;
} }
public void initServerIPandProt() { // public void initServerIPandProt() {
InetAddress ia=null; // InetAddress ia=null;
try { // try {
ia=ia.getLocalHost(); // ia=ia.getLocalHost();
String deliveryAddress = ia.getHostAddress() +":"+9991; // String deliveryAddress = ia.getHostAddress() +":"+9991;
RedisUtil.getInstence().putMapEntry(RedisUserKey.IP_AND_PROT_MAP, String.valueOf(9991),deliveryAddress,3,-1); // RedisUtil.getInstence().putMapEntry(RedisUserKey.IP_AND_PROT_MAP, String.valueOf(9991),deliveryAddress,3,-1);
} catch (UnknownHostException e) { // } catch (UnknownHostException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
} // }
} }

View File

@ -4,9 +4,9 @@ server.port=9991
server.context-path=/delivery server.context-path=/delivery
# redis config # redis config
spring.redis.host = 60.1.1.14 spring.redis.host = 150.116.94.74
spring.redis.port = 6379 spring.redis.port = 6379
spring.redis.password = spring.redis.password = redis.ljsd.COM@
spring.redis.expireTime = -1 spring.redis.expireTime = -1
spring.data.mongodb.uri = mongodb://60.1.1.14:27017/ysj_core spring.data.mongodb.uri = mongodb://60.1.1.14:27017/ysj_core