热门 Mybatis配置文件写法
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configurati...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configurati...
package pw.goyd.db;
import pw.goyd.game.constant.setting.ServerSetting;
import pw.goyd.game.server.ServerLog;
import pw.goyd.subscribe.Publisher;
import redis.clients.jedis.Jedis;
import redis.cl...
package pw.goyd.db;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import pw.goyd.game.constant.se...
private static void serverTimer() {
Timer timer = new Timer();
timer.schedule(new RunningTask(), 0, 1000);// 计时器和任务处理
}
传统dao开发也可以
这种方法是使用Mapper代理操作
AccountMapper accountMapper = Server.sessionFactory.openSession()
.getMapper(AccountMapper.class);
Account account = accountMapper.getAccount(acc);...
/**
* 获取上次调用栈
* @return
*/
public static Logger getLogger(){
StackTraceElement stack[] = Thread.currentThread().getStackTrace();
logger = LoggerFactory.getLogger(stac...
目前要解决的是,服务端根据发来的command进行指定的操作
按照以前的有switch代码快400行 现在几行
@Override public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception { Request request = (Request)...