Loading

摘要: 我们在一般在配置 SSM 项目时会将 `DispatcherServlet` 的 `url-pattern` 配置为 `*.do`、 `*.action`、 `/*` 或 `/`, 今天就来分析一下它们的区别。以及 Tomcat 中内置的两个 Servlet: `DefaultServlet` 和 阅读全文
posted @ 2021-10-11 01:41 xtyuns 阅读(168) 评论(0) 推荐(0)
摘要: SSM 配置信息, 记录一下便于以后使用 ## pom 依赖 ```xml javax.servlet javax.servlet-api 4.0.1 provided mysql mysql-connector-java 8.0.25 org.springframework spring-webm 阅读全文
posted @ 2021-10-09 13:06 xtyuns 阅读(51) 评论(0) 推荐(0)
摘要: > https://javascript.info/script-async-defer ## 使用方式 首先来看一下以下三种不同的 js 引入方式: ```html ``` ## 区别 先看一张图 ![async scripts, defer scripts, module scripts: ex 阅读全文
posted @ 2021-10-08 19:25 xtyuns 阅读(118) 评论(0) 推荐(0)
摘要: 先上一段使用 MD5 加密的代码 ```java MessageDigest md5 = MessageDigest.getInstance("MD5"); byte[] bytesArr1 = txt.getBytes(StandardCharsets.UTF_8); byte[] bytesAr 阅读全文
posted @ 2021-10-07 22:04 xtyuns 阅读(384) 评论(0) 推荐(0)
摘要: # SpringMVC spring-context 依赖于 spring-core + spring-beans + spring-aop + spring-expression spring-webmvc 依赖于 spring-context + spring-web ## 执行流程 ![Spr 阅读全文
posted @ 2021-09-30 13:01 xtyuns 阅读(37) 评论(0) 推荐(0)
摘要: # Spring ## 整体架构 [spring framework体系结构及模块jar依赖关系](https://www.jianshu.com/p/5b0c96975164) [Spring Framework 5 模块组成、体系结构、整体架构 - Jacian - 博客园](https://w 阅读全文
posted @ 2021-09-30 12:59 xtyuns 阅读(16) 评论(0) 推荐(0)
摘要: Mybatis 准备工作 使用 MyBatis 必须导入其 jar 包,在 maven 中的 pom.xml 中声明以下依赖。 <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java< 阅读全文
posted @ 2021-09-25 16:13 xtyuns 阅读(54) 评论(0) 推荐(0)
摘要: MySQL 中的 datetime 对应 Java 中的 java.util.date, 如果使用 java.sql.date 时分秒将会丢失。 阅读全文
posted @ 2021-09-24 19:48 xtyuns 阅读(4246) 评论(0) 推荐(1)
摘要: IDEA 中添加 MyBatis 配置模板 起因 每次编写 Mybatis 都需要复制一份 xml 配置文件和 mapper 配置文件,十分麻烦,所以就借助 IDEA 中的 Liva Template 编写了一份 MyBatis 的模板文件来帮助我们更加快捷的进行开发。 效果演示 配置步骤 首先打开 阅读全文
posted @ 2021-09-24 15:04 xtyuns 阅读(910) 评论(0) 推荐(0)
摘要: # Maven ## 相关文章 pom.xml 中 build 的配置: [Maven之pom.xml文件中的Build配置_剑小纯的夜话白鹭-CSDN博客](https://blog.csdn.net/xiaoyao2246/article/details/88355463) ## 概念 ### 阅读全文
posted @ 2021-09-23 21:27 xtyuns 阅读(81) 评论(0) 推荐(0)
摘要: Junit 5 总体架构 使用 Junit 5 如何在 Maven 中配置 Junit 5 的依赖: 咱的Maven项目能用Junit5吗? - 剑道子羽 - 博客园 案例演示: Junit5 新特性你用过多少? - 云+社区 - 腾讯云 系列教程: JUnit5学习之八:综合进阶(终篇)_程序员欣 阅读全文
posted @ 2021-09-23 09:27 xtyuns 阅读(77) 评论(0) 推荐(0)
摘要: ## 代码示例 ```java public static void main(String[] args) { int value = 0; IntStream.range(0, 10).forEach(i -> value++); System.out.println(value); } ``` 阅读全文
posted @ 2021-09-19 18:49 xtyuns 阅读(1383) 评论(0) 推荐(2)
摘要: 推荐阅读文章: - [(很详细的使用教程) servlet入门+request和response+jackson - 一路繁花似锦绣前程 - 博客园](https://www.cnblogs.com/linding/p/13577955.html) - [JSP、EL和JSTL - 一路繁花似锦绣前 阅读全文
posted @ 2021-09-14 10:06 xtyuns 阅读(56) 评论(0) 推荐(0)
摘要: ## 使用方法 一、Child.class ```java package proxys; public interface Child { void eat(); } ``` 二、ChildImpl.class ```java package proxys; public class ChildI 阅读全文
posted @ 2021-08-20 15:52 xtyuns 阅读(115) 评论(0) 推荐(0)
摘要: 一、懒汉式 ```java public class ASingleton { private static ASingleton INSTANCE; private ASingleton() {} /** * 懒汉: 延迟初始化, 线程不安全的单例模式 * @return 对象实例 */ publ 阅读全文
posted @ 2021-08-20 10:47 xtyuns 阅读(47) 评论(0) 推荐(0)