@@ -0,0 +1,1361 @@
+package org.pinae.timon.session;%0A%0Aimport java.io.IOException;%0A%0Aimport org.pinae.timon.session.defaults.DefaultSqlSessionFactory;%0A%0A/**%0A * %E4%BC%9A%E8%AF%9D%E5%B8%AE%E5%8A%A9%E7%B1%BB%0A * %0A * @author Huiyugeng%0A *%0A */%0Apublic class SqlSessionHelper %7B%0A%09%0A%09private static final ThreadLocal%3CSqlSessionFactory%3E THREAD_SESSION_FACTORY = new ThreadLocal%3CSqlSessionFactory%3E();%0A%09private static final ThreadLocal%3CSqlSession%3E THREAD_SESSION = new ThreadLocal%3CSqlSession%3E();%0A%09%0A%09/**%0A%09 * %E8%8E%B7%E5%8F%96%E5%BD%93%E5%89%8D%E7%BA%BF%E7%A8%8B%E7%9A%84%E4%BC%9A%E8%AF%9D%E5%B7%A5%E5%8E%82%E7%B1%BB%0A%09 * %0A%09 * @return %E4%BC%9A%E8%AF%9D%E5%B7%A5%E5%8E%82%E7%B1%BB%0A%09 * @throws IOException IO%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86%0A%09 */%0A%09public static SqlSessionFactory getSessionFactory() throws IOException %7B%0A%09%09SqlSessionFactory sessionFactory = THREAD_SESSION_FACTORY.get();%0A%09%09try %7B%0A%09%09%09if (sessionFactory == null) %7B%0A%09%09%09%09sessionFactory = new DefaultSqlSessionFactory();%0A%09%09%09%09THREAD_SESSION_FACTORY.set(sessionFactory);%0A%09%09%09%7D%0A%09%09%7D catch (Exception e) %7B  %0A%09        throw new IOException(e);  %0A%09    %7D  %0A%09    return sessionFactory;  %0A%09%7D%0A%09%0A%09/**%0A%09 * %E8%8E%B7%E5%8F%96%E5%BD%93%E5%89%8D%E7%BA%BF%E7%A8%8B%E7%9A%84Sql%E4%BC%9A%E8%AF%9D%0A%09 * %0A%09 * @return Sql%E4%BC%9A%E8%AF%9D%E7%B1%BB%0A%09 * @throws IOException IO%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86%0A%09 */%0A%09public static SqlSession getSession() throws IOException %7B%0A%09%09SqlSession session = (SqlSession) THREAD_SESSION.get();  %0A%09    try %7B  %0A%09        if (session == null) %7B  %0A%09        %09session = getSessionFactory().getSession();%0A%09        %09THREAD_SESSION.set(session);  %0A%09        %7D  %0A%09    %7D catch (Exception e) %7B  %0A%09        throw new IOException(e);  %0A%09    %7D  %0A%09    return session;  %0A%09%7D%0A%7D%0A

Add static getSqlSessionFactory and getSqlSession