diff --git a/panda-aop/src/main/java/org/panda/aop/proxy/ProxyChain.java b/panda-aop/src/main/java/org/panda/aop/proxy/ProxyChain.java index a615f8a..a1d91e1 100644 --- a/panda-aop/src/main/java/org/panda/aop/proxy/ProxyChain.java +++ b/panda-aop/src/main/java/org/panda/aop/proxy/ProxyChain.java @@ -35,7 +35,7 @@ public class ProxyChain { /** *代理集合 */ - private List proxyList = new ArrayList(); + private List proxyList ; /** * 代理索引 */ diff --git a/panda-aop/src/test/java/org/panda/aop/service/HelloService.java b/panda-aop/src/test/java/org/panda/aop/service/HelloService.java new file mode 100644 index 0000000..f3e7482 --- /dev/null +++ b/panda-aop/src/test/java/org/panda/aop/service/HelloService.java @@ -0,0 +1,11 @@ +package org.panda.aop.service; + +/** + * @Author: qi + * @Description: + * @Date: Create in 4:24 PM 2019/5/20 + */ +public interface HelloService { + + String sayHello(String name); +} diff --git a/panda-aop/src/test/java/org/panda/aop/util/InterfaceProxyFactoryUtilTest.java b/panda-aop/src/test/java/org/panda/aop/util/InterfaceProxyFactoryUtilTest.java index 9623434..350d2d3 100644 --- a/panda-aop/src/test/java/org/panda/aop/util/InterfaceProxyFactoryUtilTest.java +++ b/panda-aop/src/test/java/org/panda/aop/util/InterfaceProxyFactoryUtilTest.java @@ -1,5 +1,7 @@ package org.panda.aop.util; +import org.panda.aop.service.HelloService; + import static org.junit.Assert.*; public class InterfaceProxyFactoryUtilTest { @@ -10,5 +12,7 @@ public class InterfaceProxyFactoryUtilTest { @org.junit.Test public void invoke() { + HelloService helloService = InterfaceProxyFactoryUtil.newMapperProxy(HelloService.class); + helloService.sayHello("nihoa"); } } \ No newline at end of file diff --git a/panda-beans/src/main/java/org/panda/beans/adapter/BeanAdapter.java b/panda-beans/src/main/java/org/panda/beans/adapter/BeanAdapter.java index cb0ac94..e38e18e 100644 --- a/panda-beans/src/main/java/org/panda/beans/adapter/BeanAdapter.java +++ b/panda-beans/src/main/java/org/panda/beans/adapter/BeanAdapter.java @@ -2,7 +2,7 @@ package org.panda.beans.adapter; /** * @Author: qi - * @Description: + * @Description: 实体类适配器 * @Date: Create in 9:29 AM 2019/2/23 */ public interface BeanAdapter { diff --git a/panda-beans/src/main/java/org/panda/beans/util/BeanUtil.java b/panda-beans/src/main/java/org/panda/beans/util/BeanUtil.java index 474b19c..5d79f7d 100644 --- a/panda-beans/src/main/java/org/panda/beans/util/BeanUtil.java +++ b/panda-beans/src/main/java/org/panda/beans/util/BeanUtil.java @@ -14,6 +14,7 @@ import java.util.*; /** * @author qi + * 实体类工具 * Created by qi_liang on 2018/1/29. */ public class BeanUtil { @@ -207,17 +208,4 @@ public class BeanUtil { return fieldObjectMap; } - - /** - * 判断对象是否为空 ,为空返回true - * @param object - * @return - */ - public boolean isNull(Object object){ - - return object==null; - } - - - } diff --git a/panda-code/src/main/java/org/panda/code/uitl/file/FileUtil.java b/panda-code/src/main/java/org/panda/code/uitl/file/FileUtil.java index e1e634c..3bf94da 100644 --- a/panda-code/src/main/java/org/panda/code/uitl/file/FileUtil.java +++ b/panda-code/src/main/java/org/panda/code/uitl/file/FileUtil.java @@ -12,7 +12,7 @@ import java.util.List; /** * @author qi - * + * 文件工具类 */ public class FileUtil { diff --git a/panda-code/src/main/java/org/panda/code/uitl/os/JvmUtil.java b/panda-code/src/main/java/org/panda/code/uitl/os/JvmUtil.java index c26e523..5b473fb 100644 --- a/panda-code/src/main/java/org/panda/code/uitl/os/JvmUtil.java +++ b/panda-code/src/main/java/org/panda/code/uitl/os/JvmUtil.java @@ -8,6 +8,7 @@ import java.util.Set; /** * @author qi + * JVM工具类 * Created by qi_liang on 2018/6/9. */ public class JvmUtil { diff --git a/panda-code/src/main/java/org/panda/code/uitl/os/mode/JvmInfo.java b/panda-code/src/main/java/org/panda/code/uitl/os/mode/JvmInfo.java index f376dab..c6afc32 100644 --- a/panda-code/src/main/java/org/panda/code/uitl/os/mode/JvmInfo.java +++ b/panda-code/src/main/java/org/panda/code/uitl/os/mode/JvmInfo.java @@ -2,14 +2,21 @@ package org.panda.code.uitl.os.mode; /** * @author qi + * JVM实体详情实体类 * Created by qi_liang on 2018/6/10. */ public class JvmInfo { - //版本号 + /** + * 版本号 + */ private String version; - //总内存 + /** + * 总内存 + */ private Long totalMemory; - //可以使用处理器个数 + /** + * 处理器个数 + */ private Integer cupNum; public String getVersion() { diff --git a/panda-code/src/main/java/org/panda/code/uitl/os/mode/OsInfo.java b/panda-code/src/main/java/org/panda/code/uitl/os/mode/OsInfo.java index 5830b4e..2d4540b 100644 --- a/panda-code/src/main/java/org/panda/code/uitl/os/mode/OsInfo.java +++ b/panda-code/src/main/java/org/panda/code/uitl/os/mode/OsInfo.java @@ -2,15 +2,22 @@ package org.panda.code.uitl.os.mode; /** * @author qi + * 系统详情实体类 * Created by qi_liang on 2018/6/10. */ public class OsInfo { - //操作系统名称 + /** + * 操作系统名称 + */ private String osName; - //操作系统版本号 + /** + * 操作系统版本号 + */ private String osVersion; - //操作系统架构 + /** + * 操作系统架构 + */ private String arch; public String getOsName() { diff --git a/panda-jdbc/src/main/java/org/panda/jdbc/proxy/TransactionProxy.java b/panda-jdbc/src/main/java/org/panda/jdbc/proxy/TransactionProxy.java index 363978d..8534c53 100644 --- a/panda-jdbc/src/main/java/org/panda/jdbc/proxy/TransactionProxy.java +++ b/panda-jdbc/src/main/java/org/panda/jdbc/proxy/TransactionProxy.java @@ -39,6 +39,7 @@ public class TransactionProxy implements Proxy { DataBaseHelper.commitTransaction(); LOGGER.debug("commit transaction"); }catch (Exception e){ + //事务回滚 DataBaseHelper.rollbackTransation(); LOGGER.debug("rollback transaction"); throw e; diff --git a/panda-web/panda-web.iml b/panda-web/panda-web.iml index cc0ab6b..ac27d97 100644 --- a/panda-web/panda-web.iml +++ b/panda-web/panda-web.iml @@ -17,12 +17,17 @@ + + + + + + - @@ -39,5 +44,6 @@ + \ No newline at end of file diff --git a/panda-web/src/main/java/org/panda/web/helper/AopHelper.java b/panda-web/src/main/java/org/panda/web/helper/AopHelper.java index 3a94941..8471ad6 100644 --- a/panda-web/src/main/java/org/panda/web/helper/AopHelper.java +++ b/panda-web/src/main/java/org/panda/web/helper/AopHelper.java @@ -116,6 +116,10 @@ public final class AopHelper { }); } + /** + * 加入事务代理 + * @param proxyMap + */ private static void addTransactionProxy(Map> proxyMap) { Set serviceClassSet = ClassHelper.getClassSetByAnnotation(Service.class); proxyMap.put(TransactionProxy.class, serviceClassSet); diff --git a/panda-web/src/main/java/org/panda/web/servlet/DispatcherServlet.java b/panda-web/src/main/java/org/panda/web/servlet/DispatcherServlet.java index 9726791..f1539fb 100644 --- a/panda-web/src/main/java/org/panda/web/servlet/DispatcherServlet.java +++ b/panda-web/src/main/java/org/panda/web/servlet/DispatcherServlet.java @@ -60,7 +60,6 @@ public class DispatcherServlet extends HttpServlet{ @Override protected void service(HttpServletRequest req, HttpServletResponse resp){ - // super.service(req, resp); ServletHelper.init(req,resp); try { //获取请求的方法类型:(Post,Get...)