上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: AOP实现 动态代理:代理模式 - CoderDreams - 博客园 (cnblogs.com) 方式一:使用Spring的API(参数功能强大) 实现MethodBeforeAdvice接口 添加的功能 public class Log implements MethodBeforeAdvice 阅读全文
posted @ 2022-03-20 20:46 CoderCatIce 阅读(46) 评论(0) 推荐(0) 编辑
摘要: log4j的配置文件 #将等级为DEBUG的日志信息输出到console和file这两个目的地,console和file的定义在下面的代码 log4j.rootLogger=DEBUG,console,file #控制台输出的相关设置 log4j.appender.console = org.apa 阅读全文
posted @ 2022-03-17 14:09 CoderCatIce 阅读(19) 评论(0) 推荐(0) 编辑
摘要: Mybatis中的CRUD Mybatis工具类 public class MybatisUtils { private static SqlSessionFactory sqlSessionFactory; static { try { // 从配置文件获取SqlSessionFactory St 阅读全文
posted @ 2022-03-15 21:57 CoderCatIce 阅读(16) 评论(0) 推荐(0) 编辑
摘要: MyBatis中: Error building SqlSession. The error may exist in SQL Mapper Configuration Cause: org.apache.ibatis.builder.BuilderException: Error parsing 阅读全文
posted @ 2022-03-15 17:11 CoderCatIce 阅读(513) 评论(0) 推荐(0) 编辑
摘要: DBUtils的使用 QueryRunner的插入使用 @Test public void testInsert() throws Exception { QueryRunner queryRunner = new QueryRunner(); String insert = "insert int 阅读全文
posted @ 2022-03-09 21:10 CoderCatIce 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Druid线程池创建Connection 代码实现 public class DruidTest { public static void main(String[] args) throws Exception { new DruidTest().getConnection(); } public 阅读全文
posted @ 2022-03-09 19:50 CoderCatIce 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 代理模式 静态代理 /* * 代理模式 * */ public class Demo { public static void main(String[] args) { // 实例化被代理类 Demo01Impl demo01 = new Demo01Impl(); // 使用被代理类实例化代理类 阅读全文
posted @ 2022-03-09 12:15 CoderCatIce 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 反射的使用 拿到此类的接口/包/注解 import java.lang.annotation.Annotation; @Deprecated public class demo6 implements Runnable { @Override public void run() { } public 阅读全文
posted @ 2022-03-09 10:00 CoderCatIce 阅读(16) 评论(0) 推荐(0) 编辑
摘要: java批处理sql 需要5.1.37及之后的驱动jar包 需要rewriteBatchedStatements=true import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedState 阅读全文
posted @ 2022-03-08 23:16 CoderCatIce 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 单例设计模式 懒汉式 /* * 单例设计模式:懒汉式 * */ public class SingleTonDemo02 { public static void main(String[] args) { Demo02 instance1 = Demo02.getInstance(); Demo0 阅读全文
posted @ 2022-03-08 20:09 CoderCatIce 阅读(19) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页