合集-Java中使用到的模板
摘要:2023-08-30 driverClassName=com.mysql.cj.jdbc.Driver url=jdbc:mysql://localhost:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTim
阅读全文
摘要:2023-08-30 import java.util.Scanner; public class Utility { //静态属性。。。 private static Scanner scanner = new Scanner(System.in); /** * 功能:读取键盘输入的一个菜单选项,
阅读全文
摘要:2023-09-01 jdbc:mysql://localhost:3306/xxxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = GMT&rewriteBatchedStatements=true
阅读全文
摘要:2023-09-02 依赖的jar包 <!-- log4j --><dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version></dependency> 配置文件 <?xm
阅读全文
摘要:2023-09-02 UserMapper.xml模板 方式一: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.
阅读全文
摘要:2023-09-02 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis
阅读全文
摘要:2023-09-02 <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapp
阅读全文
摘要:2023-09-03 <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> <
阅读全文
摘要:2023-09-03 package com.hh.RequestAndResponse; /** * @author hh * @version 1.0 * @DATE 2023-09-03 12:51:44 */ import javax.servlet.ServletException; im
阅读全文
摘要:2023-09-03 方式一 package com.hh.util; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibati
阅读全文
摘要:2023-09-04 package com.hh.util; import javax.imageio.ImageIO; import java.awt.*; import java.awt.geom.AffineTransform; import java.awt.image.BufferedI
阅读全文
摘要:2023-09-07 applicationContext.xml 步骤: 需要设置命名空间 设置jdbc.properties的占位符 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.o
阅读全文
摘要:2023-09-07 applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://
阅读全文
摘要:2023-09-07 package com.hh.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configura
阅读全文
摘要:2023-09-07 jdbc.properties 注意里面的url中此时里面书写的是&而不是转移之后的,以及要注意数据库的名称是否存在 jdbc.driverClassName=com.mysql.cj.jdbc.Driver jdbc.url=jdbc:mysql://localhost:33
阅读全文
摘要:2023-09-07 注意:spring整合junit中的依赖要和spring-context的依赖版本相一致 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.2</version>
阅读全文
摘要:2023-09-07 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta
阅读全文
摘要:2023-09-08 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.15.2</version> </dependency
阅读全文
摘要:2023-09-09 注意,注意,一定要注意,mybatis的jar包与mybatis-spring的jar包的版本,一定要看这两个jar包的版本下面是与java8匹配的版本 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
阅读全文
摘要:2023-09-09 BusinessException package com.hh.exception; /** * @author hh * @version 1.0 * @DATE 2023-09-09 9:39:49 */ public class BusinessException ex
阅读全文