合集-Java中使用到的模板

摘要:2023-08-30 driverClassName=com.mysql.cj.jdbc.Driver url=jdbc:mysql://localhost:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTim 阅读全文
posted @ 2023-08-30 13:46 努力是一种常态 阅读(158) 评论(0) 推荐(0) 编辑
摘要:2023-08-30 import java.util.Scanner; public class Utility { //静态属性。。。 private static Scanner scanner = new Scanner(System.in); /** * 功能:读取键盘输入的一个菜单选项, 阅读全文
posted @ 2023-08-30 20:48 努力是一种常态 阅读(72) 评论(0) 推荐(0) 编辑
摘要:2023-09-01 jdbc:mysql://localhost:3306/xxxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = GMT&rewriteBatchedStatements=true 阅读全文
posted @ 2023-09-01 18:54 努力是一种常态 阅读(456) 评论(1) 推荐(0) 编辑
摘要:2023-09-02 依赖的jar包 <!-- log4j --><dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version></dependency> 配置文件 <?xm 阅读全文
posted @ 2023-09-02 10:49 努力是一种常态 阅读(79) 评论(0) 推荐(0) 编辑
摘要:2023-09-02 UserMapper.xml模板 方式一: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis. 阅读全文
posted @ 2023-09-02 10:56 努力是一种常态 阅读(245) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2023-09-02 10:57 努力是一种常态 阅读(120) 评论(2) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2023-09-02 12:14 努力是一种常态 阅读(46) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> < 阅读全文
posted @ 2023-09-03 11:30 努力是一种常态 阅读(49) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 package com.hh.RequestAndResponse; /** * @author hh * @version 1.0 * @DATE 2023-09-03 12:51:44 */ import javax.servlet.ServletException; im 阅读全文
posted @ 2023-09-03 13:15 努力是一种常态 阅读(51) 评论(0) 推荐(0) 编辑
摘要:2023-09-03 方式一 package com.hh.util; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibati 阅读全文
posted @ 2023-09-03 15:19 努力是一种常态 阅读(16) 评论(0) 推荐(0) 编辑
摘要:2023-09-04 package com.hh.util; import javax.imageio.ImageIO; import java.awt.*; import java.awt.geom.AffineTransform; import java.awt.image.BufferedI 阅读全文
posted @ 2023-09-04 13:24 努力是一种常态 阅读(132) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 applicationContext.xml 步骤: 需要设置命名空间 设置jdbc.properties的占位符 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.o 阅读全文
posted @ 2023-09-07 10:23 努力是一种常态 阅读(128) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http:// 阅读全文
posted @ 2023-09-07 11:54 努力是一种常态 阅读(31) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 package com.hh.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configura 阅读全文
posted @ 2023-09-07 12:18 努力是一种常态 阅读(16) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 jdbc.properties 注意里面的url中此时里面书写的是&而不是转移之后的,以及要注意数据库的名称是否存在 jdbc.driverClassName=com.mysql.cj.jdbc.Driver jdbc.url=jdbc:mysql://localhost:33 阅读全文
posted @ 2023-09-07 14:59 努力是一种常态 阅读(76) 评论(0) 推荐(0) 编辑
摘要:2023-09-07 注意:spring整合junit中的依赖要和spring-context的依赖版本相一致 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.2</version> 阅读全文
posted @ 2023-09-07 15:11 努力是一种常态 阅读(47) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2023-09-07 17:09 努力是一种常态 阅读(310) 评论(0) 推荐(0) 编辑
摘要:2023-09-08 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.15.2</version> </dependency 阅读全文
posted @ 2023-09-08 11:20 努力是一种常态 阅读(28) 评论(0) 推荐(0) 编辑
摘要:2023-09-09 注意,注意,一定要注意,mybatis的jar包与mybatis-spring的jar包的版本,一定要看这两个jar包的版本下面是与java8匹配的版本 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" 阅读全文
posted @ 2023-09-09 00:32 努力是一种常态 阅读(24) 评论(0) 推荐(0) 编辑
摘要:2023-09-09 BusinessException package com.hh.exception; /** * @author hh * @version 1.0 * @DATE 2023-09-09 9:39:49 */ public class BusinessException ex 阅读全文
posted @ 2023-09-09 10:09 努力是一种常态 阅读(20) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示