Loading

摘要: Spring Boot 入门 原理初探 主程序 @SpringBootApplication public class SpringBoot01Application { public static void main(String[] args) { SpringApplication.run(S 阅读全文
posted @ 2020-06-11 20:29 shimeath 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 通常bean都是单例的,如果一个bean需要... 阅读全文
posted @ 2020-04-13 22:37 shimeath 阅读(2457) 评论(0) 推荐(0) 编辑
摘要: 构造器注入 三种依赖注入方式 格式 1. 通过index注入,为index设置需要注入参数的位置(**从0开始**) 2. 通过type注入,以类型注入 3. 通过方法参数名注入,参数名可能会有不稳定情况 <bean id="" class=""> <!-- <constructor-arg ind 阅读全文
posted @ 2020-04-07 18:11 shimeath 阅读(163) 评论(0) 推荐(0) 编辑
摘要: singleton 注意事项: 默认为singleton,即为单例。 整个应用共享,需考虑线程安全。 配置方式: <bean id="" class="" scope="singleton" >或<bean id="" class="" > prototype 注意事项: 需要在scope属性中指定 阅读全文
posted @ 2020-04-06 10:23 shimeath 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 通过修改tomcat配置文件,更改日志编码格式 在tomcat的安装目录下找到logging.properties文件,其路径如下: tomcat\conf\logging.properties 修改java.util.logging.ConsoleHandler.encoding 由UTF-8为G 阅读全文
posted @ 2020-03-21 21:49 shimeath 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 测试网站:https://regexr.com/ 正则表达式语法 普通字符 没有特殊限定的时候匹配一个相同的字符 简单转义字符 \n换行符\t制表符\字符字符本身 标准字符集合 能够与多种字符匹配的表达式 区分大小写,大写取反 \d0~9中任一字符\w 字母数字下划线,A~Z,a~z,0~9,_ \ 阅读全文
posted @ 2020-02-08 17:34 shimeath 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 一、步骤: 创建源 选择流 操作(读取|写出) 释放流 节点流:离数据源|程序最近的流 处理流:装饰模式 提高性能增强功能 字节流:可以处理一切(纯文本、音频、视频等) 1)、输入流 InputStream FileInputStream ByteArrayInputStream 操作:read(字 阅读全文
posted @ 2020-01-31 17:22 shimeath 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 通过RandomAccessFile对象进行文件分割与合并 SplitFile类的初始化 类包含的变量 private String filePath; //源文件路径 private String fileName; //源文件名 private long blockSize; //块大小 pri 阅读全文
posted @ 2020-01-31 17:08 shimeath 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 通过使用PrintStream实例输出到文件 原有System.out.println 现改为PrintStream类型的实例.println以完成输出到文件 完整代码 package cn.hxh.io.other; import java.io.*; public class PrintStre 阅读全文
posted @ 2020-01-30 12:03 shimeath 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 新学习内容 该流做的是对象持久化处理 java.io.Serializable 空接口,向jvm声明,实现了这个接口的对象即可被存储到文件中 transient(译:暂时) 声明不存储到文件中的属性 ObjectInputStream和ObjectOutputStream 对象输入输出流 建立雇员对 阅读全文
posted @ 2020-01-30 10:42 shimeath 阅读(84) 评论(0) 推荐(0) 编辑