Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

Netkiller Java 手札(2024版)

Java, Servlet, JavaBean, Struts, Spring ...

Mr. Neo Chan, 陈景峯(BG7NYT)



中国广东省深圳市望海路半岛城邦三期
518067
+86 13113668890


文档始创于 2015-11-10

电子书最近一次更新于 2024-07-24 23:29:44

版权声明

转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

http://www.netkiller.cn
http://netkiller.github.io
http://netkiller.sourceforge.net
微信公众号: netkiller
微信:13113668890 请注明“读者”
QQ:13721218 请注明“读者”
QQ群:128659835 请注明“读者”
知乎专栏

2017-11

关于《Netkiller Java 手札》

作者2002年开始在项目中使用Java,各种原因没有留下Java文档,2015因工作需要重新拾起Java并整理本文档。

本电子书重点内容是Spring boot, Spring cloud, Spring data, Spring security


致读者

Netkiller 系列手札 已经被 Github 收录,并备份保存在北极地下250米深的代码库中,备份会保留1000年。

Preserving open source software for future generations

The world is powered by open source software. It is a hidden cornerstone of modern civilization, and the shared heritage of all humanity.

The GitHub Arctic Code Vault is a data repository preserved in the Arctic World Archive (AWA), a very-long-term archival facility 250 meters deep in the permafrost of an Arctic mountain.

We are collaborating with the Bodleian Library in Oxford, the Bibliotheca Alexandrina in Egypt, and Stanford Libraries in California to store copies of 17,000 of GitHub’s most popular and most-depended-upon projects—open source’s “greatest hits”—in their archives, in museum-quality cases, to preserve them for future generations.

https://archiveprogram.github.com/arctic-vault/

目录

1. 自述
1.1. 写给读者
1.2. 作者简介
1.3. 如何获得文档
1.4. 打赏(Donations)
1.5. 联系方式
I. Java 21
1. JVM
1.1. Almalinux / RockyLinux
1.2. CentOS 8 Java 14
1.3. Java 版本切换
1.4. 安装 Java 6
1.4.1. HeapDumpOnOutOfMemoryError
1.5. java-1.8.0-openjdk
1.6. docker 环境
1.7. java - Launches a Java application.
1.7.1. java 9~11
1.7.2. -verbose:class 显示载入jar文件
1.7.3. java.io.tmpdir
1.7.4. 显示版本号
1.7.5. 列出java模块
1.8. Java 相关命令
1.8.1. jps
1.8.2. jar
1.8.3. jdeps - Java class dependency analyzer.
1.8.4. JShell
1.8.5. jlink
2. exec 运行shell
2.1. System
2.1.1. user.dir
2.1.2. java.io.tmpdir
2.1.3. 打印当前 Java 文件的默认编码
2.1.4. 自定义
2.1.5. System.in 标准输入(Stdin)
2.1.6. ANSI Color
3. 数据类型
3.1. var 本地变量类型推断
3.2. Integer 整形
3.2.1. 字符串转整数
3.2.2. 进制转换
3.2.3. 前面补零
3.2.4. NumberFormat 数字格式化
3.3. String 字符串
3.3.1. 查找字符重现的位置
3.3.2. 行数统计
3.3.3. 复制字符串
3.3.4. 随机字符串
3.3.5. 字符串替换处理
3.3.6. substring
3.3.7. string to timestamp
3.3.8. String.strip
3.3.9. 文本块
3.3.10. 分割字符串
3.3.11. 通过 stream() 匹配一组字符串
3.4. 类型转换
3.4.1. Long to String
3.5. Date 日期时间
3.5.1. String to Date
3.5.2. DateTimeFormatter 格式化日期和时间
3.5.3. SimpleDateFormat 格式化日期和时间
3.5.4. Timestamp
3.5.5. TimeZone
3.5.6. 比较两个日期与时间
3.5.7. Calendar
3.5.8. getToday
3.5.9. Yesterday
3.5.10. ISO 8601
3.5.11. LocalDateTime
3.6. Array 数组
3.6.1. 字符串转数组
3.6.2. for each
3.6.3. Array to String
3.6.4. 数据转字符串
3.7. float 浮点
3.8. double 双精度浮点
3.8.1. String to double
3.8.2. 百分数转Double
3.8.3. Double转百分数
3.9. BigDecimal
3.9.1. Convert BigDecimal Object to double value
3.9.2. 去除末尾多余的0
3.9.3. 禁用科学计数法
3.9.4. 移动小数点位置
3.10. StringBuffer
3.11. enum
3.12. byte 类型
3.12.1. string2byte
3.12.2. byte[] to String
3.12.3. BigInteger2byte
3.12.4. int to byte array
3.12.5. byte array to int
3.12.6. byte2char
3.12.7. longToByte64
3.12.8. byte64ToLong
3.12.9. short2byte
3.12.10. byte8ToDouble
3.12.11. byte4ToFloat
3.12.12. 无符号 byte
3.12.13. byte to hex
3.12.14. byte[] to hex
3.12.15. 连接两个 byte[]
3.12.16. List<Byte> to byte[]
3.13. 布尔型 Boolean
4. 流程控制
4.1. Switch
4.1.1. yield
5. 面向对象
5.1. 可变参数
5.2. 泛型
5.2.1.
5.2.2. 数组泛型方法
5.2.3. 静态方法
5.2.4. 可变参数的泛型方法
5.2.5. 返回泛型值
5.2.6. 泛型类
5.3. record
5.4. Callback 回调
5.5. 密封类
5.5.1.
6. 异常处理
6.1. 抛出异常
6.2. try-with-resources
6.3. SneakyThrows
6.3.1. 处理所有异常 Exception
6.3.2. 处理特定异常
6.3.3. 抛出异常
7. Java 线程
7.1. 多线程 Lambda 表达式
7.2. 实现异步执行
7.3. 继承 Thread 类实现多线程
7.3.1. 设置线程名称
7.4. 实现 Runnable 接口
7.5. 线程同步
7.6. ThreadLocal
7.7. ThreadLocalMap
7.8. InheritableThreadLocal
7.9. 守护线程
7.10. 线程等待与线程通知
7.10.1. 通知所有线程
7.10.2. 携带消息
II. JDK Development Kit
8. 数据结构
8.1. Collection 接口
8.2. List
8.2.1. 静态 List
8.2.2. List.of()
8.2.3. List.copyOf()
8.2.4. String[] to List
8.2.5. Stream.toList() 方法
8.2.6. containsAll
8.2.7. stream().allMatch()
8.2.8. 随机 List
8.2.9. getFirst() / getLast()
8.2.10. List 转 Array
8.3. ArrayList
8.3.1. 初始化
8.3.2. 判断元素是否存在
8.3.3. 循环打印
8.3.4. ArrayList to Array
8.3.5. ArrayList to String
8.3.6. Array to List
8.3.7. List to Array
8.3.8. ArrayList forEach
8.3.9. ArrayList stream()
8.3.10. ArrarList 转换为 string[]
8.3.11. string 转换为 ArrayList
8.3.12. ArrayList 转换为 string
8.3.13. string[] 转换为 ArrarList
8.3.14. 合并 List<byte[]> ArrayList<byte[]>
8.4. LinkedList
8.5.
8.5.1. Set 初始化
8.5.2. Set 转为 List
8.5.3. Set.of()
8.5.4. Set to Array
8.6. Map
8.6.1. 初始化
8.6.2. HashMap
8.6.3. LinkedHashMap
8.6.4. 遍历数据
8.6.5. 迭代器
8.6.6. Map forEach
8.6.7. 随机取值
8.7. Iterator 迭代器
8.7.1. List 迭代
8.7.2. 处理剩余结果
8.7.3. Map 迭代
8.7.4. Iterator 与 List 的区别
8.7.5. remove() 删除操作
8.7.6. Iterable 转 List
8.8. ListIterator
8.9. Queue
8.9.1. 阻塞队列
8.9.2.
8.9.3. Deque 双端队列
8.9.4. 数据转换
8.9.5. PriorityBlockingQueue
8.10. Stack
8.11. Optional
8.11.1. of() 为非null的值创建一个Optional。
8.11.2. ofNullable() 为指定的值创建一个Optional,如果指定的值为null,则返回一个空的Optional。
8.11.3. isPresent 如果值存在返回true,否则返回false。ifEmpty() null 返回 true 否则返回 false
8.11.4. ifPresent() 如果Optional实例有值执行 lambda 表达式
8.11.5. get() 返回值
8.11.6. orElse 如果有值则将其返回,否则返回指定的其它值。
8.11.7. orElseGet与orElse方法类似,区别在于得到的默认值从 Supplier 返回。
8.11.8. orElseThrow 如果有值则将其返回,否则抛出supplier接口创建的异常
8.11.9. map() 方法用来对Optional实例的值执行一系列操作
8.11.10. flatMap()
8.11.11. filter() 通过传入限定条件过滤Optional值
8.11.12. stream()
8.11.13. or()
8.11.14. example
9. 正则表达式
9.1. 正则查找
9.2. 正则替换
9.3. 字符串分割
10. Java 并发编程
10.1. TimeUnit
10.2. AtomicInteger / AtomicLong / AtomicBoolean
10.3. AtomicReference
10.4. ReentrantLock 锁
10.5. 线程安全的 HashMap(ConcurrentHashMap)
10.5.1. 设置键与值
10.6. ConcurrentLinkedQueue
10.7. ArrayBlockingQueue
10.8. Future
10.8.1. Future + Stream 管理一组线程
10.9. FutureTask
10.10. CompletableFuture
10.10.1. 创建 CompletableFuture 实例,并且其他线程中使用
10.10.2. runAsync 创建没有返回值的异步任务
10.10.3. thenRun / thenRunAsync
10.10.4. supplyAsync 创建带有返回值的异步任务。
10.10.5. thenAccept / thenAcceptAsync
10.10.6. 获取结果
10.10.7. thenApply / thenApplyAsync
10.10.8. runAsync / thenAccept / thenApply 区别
10.10.9. whenComplete 任务完成时执行,并且返回结果和异常
10.10.10. 超时处理
10.10.11. 按顺序执行
10.10.12. thenCombine、thenAcceptBoth 和runAfterBoth
10.10.13. applyToEither、acceptEither和runAfterEither
10.10.14. allOf / anyOf
10.10.15. 并行执行 CompletableFuture
10.10.16. 通知完成任务
10.10.17. 异常处理
10.10.18. CompletableFuture 实现 Pipeline 流水线
10.11. java 线程池
10.11.1. newCachedThreadPool
10.11.2. 固定线程池(newFixedThreadPool)
10.11.3. Executors.newScheduledThreadPool
10.11.4. SingleThreadExecutor
10.11.5. ExecutorService 正确关闭方法
10.11.6. ForkJoinPool / ForkJoinTask
10.12. Flow
10.12.1. 自定义 Publisher / Subscriber
10.12.2. SubmissionPublisher
10.12.3. Flow.Processor
10.13. Java 协程
11. Stream
11.1. Stream.of
11.2. Stream.ofNullable
11.3. filter
11.4. map
11.5. limit/skip
11.6. sorted
11.7. distinct
11.8. forEach
11.9. count
11.10. 流转列表
11.11. collect
11.11.1. Collectors.toList() 列表转字符串
11.11.2. Collectors.joining() 连接字符串
11.11.3. 转 Set Collectors.toSet()
11.11.4. Collectors.teeing()
11.12. takeWhile 和 dropWhile
11.13. 合并 Stream
11.14. mapToObj
11.15. 混合使用的例子
11.15.1. List to Stream
11.16. 流复用 streamSupplier
11.17. Parallel Streams(并行流)
11.18. IntStream / LongStream / DoubleStream
12. 函数式编程
12.1. Supplier 供应型的接口
12.1.1. Supplier 作为方法参数使用
12.2. IntSupplier / LongSupplier / DoubleSupplier / BooleanSupplier
12.3. Consumer 消费型的接口
12.4. IntConsumer
12.5. BiConsumer
12.6. BiFunction
12.7. Predicate 判断型的接口
12.8. Supplier / Consumer / Predicate 应用场景
13. Util
13.1. Properties 处理 *.properties 文件
13.1.1. 打开 properties 文件
13.1.2. propertyNames()
13.1.3. keySet()
13.1.4. entrySet()
13.1.5. 方法中返回 Properties
13.1.6.
13.1.7. getResourceAsStream()
13.1.8. store
13.1.9. 实现国际化
13.2. Logging
13.2.1. console
13.3. BASE64
13.4. Locale 国际化
13.5. ResourceBundle
13.6. Scanner
13.7. UUID
13.8. Arrays.equals 判断两个数组是否相等
13.9. Random 随机字符串
13.9.1. 取 0-n 范围内随机数
13.9.2. 指定随机数范围
13.10. CRC32
13.11. Timer / TimerTask 实现周期性重复执行
14. 时间
14.1. LocalDate
14.2. LocalTime
14.3. ZonedDateTime
14.4. DateTimeFormatter
14.5. Instant
14.6. Period :基于日期值
14.7. Duration:基于时间值
14.7.1. 设置指定单位的持续时间
14.7.2. 获取指定单位的持续时间
14.7.3. 获取两个时间点之间差值的持续时间
14.7.4. 获取毫秒
15. IO
15.1. 取出文件名中的扩展名
15.1.1. getAbsolutePath() 获取绝对路径
15.1.2. 创建目录 mkdir()
15.2. 临时文件
15.3. FileWriter 文本写入文件
15.4. BufferedWriter
15.5. inputStream.transferTo()
15.6. InputStreamReader
15.7. 获得 Resource 下文件路径
15.8. PrintWriter
15.9. OutputStreamWriter
15.10. FileOutputStream
15.11. FileInputStream
15.12. Scanner
15.13. 二进制文件
15.13.1. 理解二进制文件
15.13.2. byte 类型
15.13.3. boolean 布尔型
15.13.4. Long 型
15.13.5. char 类型
15.13.6. UTF 字符串
15.13.7. Short 类型
15.13.8. float 单精度浮点类型
15.13.9. double 数据类型
15.13.10. 二进制文件操作演示
16. Network
16.1. URL
16.2. 获取IP地址何机器名
17. JDBC
17.1. 安装 JDBC 包
17.2. MySQL
17.3. Oracle
17.3.1. SID
17.3.2. SERVICE_NAME
17.3.3. TNS
17.3.4. Oracle RAC Cluster
17.3.5. Oracle JDBC Demo
17.4. FAQ
17.4.1. java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
17.4.2. Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
18. Reflection 反射
18.1. 获得所有变量
18.2. 批量赋值
18.3. 方法操作
18.3.1. 获得所有方法
18.3.2. set/get 方法
18.3.3. static 方法调用
18.4. 完成的例子
19. java.security
19.1. 列出 Java 支持的数字摘要算法
19.2. 计算文件的 MD5,SHA 等 HASH 值
19.3. Md5sum
20. javax
20.1. java 脚本引擎
20.1.1. Maven
20.1.2. Helloworld
20.1.3. 运行脚本文件
20.1.4. 变量传递
20.1.5. 全局变量与局部变量定义
20.1.6. 调用脚本中的函数或方法
20.1.7. 脚本编译
20.1.8. jjs - Invokes the Nashorn engine.
20.2. Crypto
20.2.1. MD5
20.2.2. AES
20.2.3. AES/CBC/PKCS5PADDING
20.2.4. DES
III. Build Tools
21. Apache Ant
21.1. 安装 ant
21.1.1. 1.8
21.1.2. 1.10.1
21.2. ANT
21.2.1. ant.project.name
21.2.2. 定义
21.3. Project
21.3.1. property
21.3.2. ant
21.3.3. environment
21.4. path
21.5. copy
21.6. javac
21.7. condition
21.8. exec
21.8.1. sshexec
21.9. if
21.10. macrodef
21.10.1. Git
21.10.2. Rsync
21.10.3. SSH
21.10.4. maven
21.11. Javascript
21.12. mail
21.13. basename
21.14. 创建文件
21.15. FAQ
21.15.1. warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
21.15.2. 调试 exec
22. Apache Ivy
22.1. Ivy Install
22.1.1. source code
22.1.2. apt-get
22.2. Test example
23. Apache Maven
23.1. 安装 Maven
23.1.1. CentOS 8 安装 Maven
23.1.2. Ubuntu
23.1.3. 一键安装
23.1.4. apache-maven-3.8.2
23.1.5. Nexus Repository OSS
23.1.6. mvnd
23.2. Maven 命令
23.2.1. 切换 JAVA 版本
23.2.2. 参数
23.2.3. -s 指定 settings.xml 文件
23.2.4. 多线程
23.2.5. help
23.2.6. archetype:create
23.2.7. clean
23.2.8. compile
23.2.9. 编译测试代码
23.2.10. test
23.2.11. package
23.2.12. install
23.2.13. war
23.2.14. exec
23.2.15. dependency
23.2.16. jar
23.2.17. 构建装配Maven Assembly
23.2.18. 加密密码
23.2.19. help:describe
23.3. settings.xml 配置
23.3.1. Maven 仓库
23.3.2. 镜像配置
23.4. pom.xml
23.4.1. properties
23.4.2. 常用的POM属性
23.4.3. repositories 仓库配置
23.4.4. dependencies
23.4.5. dependencyManagement
23.4.6. build
23.4.7. plugins
23.5. Maven Module
23.5.1. Parent
23.5.2. 公共项目 common
23.5.3. 常规项目
23.5.4. 现在测试效果
23.6. 依赖管理
23.6.1. 创建依赖模块
23.6.2. 引用依赖管理
23.7. plugins
23.7.1. maven-compiler-plugin
23.7.2. maven-war-plugin
23.7.3. maven-antrun-plugin
23.7.4. maven-install-plugin
23.7.5. maven-surefire-plugin
23.7.6. maven-deploy-plugin
23.7.7. maven-jar-plugin
23.7.8. maven-dependency-plugin
23.7.9. spring-boot-maven-plugin
23.7.10. tomcat8-maven-plugin
23.7.11. docker-maven-plugin
23.8. 应用案例
23.8.1. 并行开发解决不同环境包引用
24. Gradle 5
24.1. 安装 Gradle
24.1.1. CentOS
24.1.2. Mac
24.1.3. Artifactory 本地仓库
24.2. Example
24.3. gradle 命令
24.3.1. tasks 列出任务
24.4. build.gradle
24.4.1. repositories
24.4.2. dependencies
24.4.3. jar
24.4.4. Task
24.5. gradle.properties
24.5.1. 列出 properties
24.5.2. 自定义 gradle.properties
24.5.3. ext
24.5.4. System.properties
25. JitPack - Easy to use package repository for Git
IV. Spring Boot
26. Spring Boot Quick start
26.1. 创建项目
26.2. pom.xml
26.3. Controller
26.4. Springboot with Maven
26.4.1. resource
26.4.2. Maven run
26.4.3. Spring Boot maven 插件 build-image
26.4.4. 生成项目信息
27. Spring 开发环境
27.1. Java 开发环境
27.2. 安装 Spring Tool Suite
27.3. Dashboard
27.4. Spring Initializr - Bootstrap your application
28. SpringApplication
28.1. 运行 Spring boot 项目
28.1.1. Linux systemd
28.1.2. 传统 init.d 脚本
28.1.3. 编译用于Tomcat的 War
28.2. @SpringBootApplication
28.2.1. 排除 @EnableAutoConfiguration 加载项
28.3. 获取 Resources 目录中的静态文件
28.4. @EnableAutoConfiguration
28.5. @ComponentScan
28.6. @EntityScan 实体扫描
28.7. @EnableJpaRepositories
28.8. 启动和销毁
28.9. 打印环境变量
28.10. CharacterEncodingFilter
28.11. 隐藏 Banner
28.12. 实体与仓库扫描
28.13. 列出 Beans
28.14. Tomcat 端口
28.15. 配置项设定
28.16. spring.profiles.active
28.17. @Profile("dev") / @ActiveProfiles("dev")
28.18. 设置默认时区
29. 如何优雅停止 Springboot 运行
29.1. 准备工作
29.2. kill 命令演示
29.3. 容器中如何优雅关闭 Springboot
29.4. 写入PID文件
30. Properties 配置文件
30.1. application.properties 配置文件
30.1.1. application.properties 参考
30.1.2. 启动指定参数
30.1.3. 加载排除
30.1.4. PID FILE
30.1.5. banner 关闭
30.1.6. server
30.1.7. logging
30.1.8. 内嵌 tomcat server
30.1.9. servlet
30.1.10. JSON 输出与日期格式化
30.1.11. SMTP 相关配置
30.1.12. Redis
30.1.13. MongoDB
30.1.14. MySQL
30.1.15. Oracle
30.1.16. default_schema
30.1.17. datasource
30.1.18. velocity
30.1.19. Security 相关配置
30.1.20. MVC 配置
30.1.21. Kafka 相关配置
30.2. Properties 文件
30.2.1. @Value 注解
30.2.2. @EnableConfigurationProperties 引用自定义 *.properties 配置文件
30.2.3. @PropertySource 注解载入 properties 文件
30.3. Environment 读取配置文件
30.4. 手工载入 *.properties 文件
30.5. 命令行注入配置项
30.5.1. spring.profiles.active 参数切换配置文件
30.5.2. SpringApplicationBuilder.properties() 方法添加配置项
30.5.3. 禁用命令行注入环境变量
30.6.
30.7. PropertyResolver 获取配置
30.8. 参数引用
30.9. 默认值
30.10. 产生随机数
30.10.1. 随机数
30.11. 多行字符串
30.12. 注入多值属性 arrays, list, set
30.13. List 列表类型
30.14. Map类型
30.15. Binder
30.16. 加密 application.properties 中的敏感内容
31. Spring boot with Logging
31.1. 配置日志文件
31.1.1. 日志输出级别
31.1.2. Spring boot 2.1 以后的版本不打印 Mapped 日志问题
31.1.3. 禁止控制台输出日志
31.1.4. 定制日志格式
31.1.5. 彩色输出
31.2. 打印日志
31.2.1. lombok
31.3. logback 配置详解
31.3.1. 标准输出
31.3.2. 禁止 logback 日志输出
31.3.3. 指定Class过滤日志
31.3.4. configuration 属性配置
31.3.5. contextName 设置上下文名称
31.3.6. property 设置变量
31.3.7. encoder 日志格式设置
31.3.8. RollingFileAppender
31.3.9. 日志过滤
31.3.10. 标准输出
31.3.11. MDC
31.3.12. 日志写入 MongoDB
31.3.13. 日志发送给 logstash
31.3.14. fluentd
31.3.15. Loki4j Logback
31.4. Log4j2 + Gelf + Logstash
31.4.1. Maven 配置
31.4.2. log4j2.xml 配置
31.4.3. Java 测试代码
31.4.4. Logstash 配置
31.4.5. 测试结果
31.4.6. Log4j2 更多技巧
31.5. 日志报警
31.5.1. Logstash 配置
31.5.2. 监控 SpringBootApplication 的启动和退出
31.6. Spring boot with ELK(Elasticsearch + Logstash + Kibana)
31.6.1. TCP 方案
31.6.2. Redis 方案
31.6.3. Kafka 方案
31.6.4. Other
32. Spring boot with Undertow
32.1. Maven 依赖
32.2. Application
32.3. 相关配置
33. Spring boot with Jetty
34. Spring boot with HTTP2 SSL
34.1. 生成自签名证书
34.2. application.properties 配置文件
34.3. 启动 Spring boot
34.4. restTemplate 调用实例
34.5. HTTP2
35. Spring boot with MongoDB
35.1. Maven
35.2. Application
35.3. MongoTemplate
35.4. Repository
36. Spring boot with MySQL
36.1. Maven
36.2. Resource
36.3. Application
36.4. JdbcTemplate
36.5. CrudRepository
37. Spring boot with Oracle
37.1. Maven
37.2. application.properties
37.3. Application
37.4. CrudRepository
37.5. JdbcTemplate
37.6. Controller
38. Spring boot with PostgreSQL
38.1. pom.xml
38.2. application.properties
38.3. Application
38.4. CrudRepository
38.5. JdbcTemplate
38.6. Controller
38.7. Test
39. Spring boot with Elasticsearch
39.1. Maven
39.2. Application
39.3. application.properties
39.4. Domain
39.5. ElasticsearchRepository
40. Spring boot with Elasticsearch TransportClient
40.1. Maven
40.2. Application
40.3. application.properties
40.4. ElasticsearchConfiguration
40.5. RestController
41. Spring boot with Apache Hive
41.1. Maven
41.2. application.properties
41.3. Configuration
41.4. CURD 操作实例
42. Spring boot with Phoenix
42.1. Maven
42.2. application.properties
42.3. Configuration
43. Spring boot with Datasource
43.1. Master / Slave 主从数据库数据源配置
43.1.1. application.properties
43.1.2. 配置主从数据源
43.1.3. 选择数据源
43.2. 多数据源配置
43.3. JPA 多数据源
44. 连接池配置
44.1. org.apache.tomcat.jdbc.pool.DataSource
44.2. druid
44.2.1. 加密数据库密码
44.3. c3p0 - JDBC3 Connection and Statement Pooling
44.4. dbcp2
44.5. bonecp
44.6. HikariPool
45. Spring boot with Queue
45.1. Spring boot with RabbitMQ(AMQP)
45.1.1. maven
45.1.2. RabbitMQConfig
45.1.3. 生产者
45.1.4. 消费者
45.2. Spring boot with Apache Kafka
45.2.1. 安装 kafka
45.2.2. maven
45.2.3. Spring boot Application
45.2.4. EnableKafka
45.2.5. KafkaListener
45.2.6. 测试
45.2.7. 完整的发布订阅实例
45.2.8. Spring cloud with Kafka
46. Spring boot with Scheduling
46.1. 启用计划任务
46.1.1. Application.java
46.1.2. 配置
46.1.3. Component
46.2. 计划任务控制开关
46.3. @Scheduled 详解
46.3.1. fixedRate 案例
46.3.2. timeUnit
46.4. cron 表达式
46.4.1. 每3秒钟一运行一次
46.4.2. 凌晨23点运行
46.4.3. 周一 ~ 周五
46.5. Timer 例子
46.6. ScheduledExecutorService 例子
47. Spring boot with Swagger
47.1. Spring boot with Springdoc
47.1.1. WebMvc
47.1.2. Webflux
47.1.3. Swagger UI
47.1.4. 从 SpringFox 迁移到 Swagger3 注解变化
47.2. Spring boot with knife4j
47.2.1. maven
47.2.2. Knife4jConfiguration
47.2.3. application.properties
47.3. springfox
47.3.1. Swagger3
47.3.2. Swagger2
47.3.3. @Api() 资源定义
47.3.4. @ApiIgnore 忽律接口
47.3.5. @ApiOperation()
47.3.6. @ApiResponses
47.3.7. @ApiModel 实体类
48. Spring boot with lombok
48.1. @Builder
48.2. @Slf4j 注解
49. Spring boot with Container
49.1. Spring boot with Docker
49.1.1. 通过 Docker 命令构建镜像
49.1.2. 通过 Maven 构建 Docker 镜像
49.1.3. [ERROR] No plugin found for prefix 'dockerfile' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/neo/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
49.1.4. curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:8888
49.2. Spring boot with Docker stack
49.2.1. 编译 Docker 镜像
49.2.2.
49.3. Spring boot with Kubernetes
49.3.1. Kubernetes 编排脚本
49.3.2. 部署镜像
50. Spring boot with command line
50.1. Maven
50.2. CommandLineRunner 例子
50.3. ApplicationRunner 例子
51. Spring Boot Actuator
51.1. Maven 依赖
51.2. 与 Spring Boot Actuator 有关的配置
51.2.1. 禁用HTTP端点
51.2.2. 安全配置
51.2.3. 修改 actuator 地址
51.2.4. 关机
51.3. actuator 接口
51.4. 健康状态
51.4.1. 健康状态
51.5. info 配置信息
51.6. beans 信息
51.7. caches
51.8. conditions
51.9. configprops 配置文件
51.10. env 环境变量
51.11. logfile 日志
51.12. threaddump 线程信息
51.13. 计划任务
51.14. metrics
51.15. 控制器映射 URL
51.16. 自定义监控指标
52. SpringBootTest
52.1. Maven 依赖
52.2. 测试类
52.2.1. Junit基本注解介绍
52.3.
52.3.1. Assert.assertEquals 判断相等
52.3.2. Assert.assertTrue
52.4. JPA 测试
52.5. TestRestTemplate
52.6. Controller单元测试
52.7. WebTestClient
53. Spring boot with Aop
53.1. Aspect
53.1.1. Maven
53.1.2. Pojo 类
53.1.3. Service 类
53.1.4. Aspect 类
53.1.5. 控制器
53.1.6. Application
53.1.7. 测试
54. Spring boot with starter
54.1. 实现 starter
54.1.1. Maven pom.xml 依赖包
54.1.2. 配置文件处理
54.1.3. 自动配置文件
54.1.4. 启用 starter 的自定义注解
54.2. 引用 starter
54.2.1. Maven pom.xml 引入依赖
54.2.2. 通过注解配置 starter
54.2.3. 测试运行结果
55. Spring boot with Monitor
55.1. Spring boot with Grafana
55.1.1. Springboot 集成 InfluxDB
55.1.2. InfluxDB
55.2. Spring Boot with Prometheus
55.2.1. Maven 依赖
55.2.2. application.properties 配置文件
55.2.3. 启动类
55.2.4. 测试
55.2.5. 控制器监控
55.2.6. 自定义埋点监控
57. Spring boot with Git version
57.1. CommonRestController 公共控制器
57.2. VersionRestController 测试控制器
57.3. 创建 .gitattributes 文件
58. Spring boot with Session share
58.1. Redis
58.1.1. Maven
58.1.2. application.properties
58.1.3. Application
58.2. 测试 Session
58.3. JDBC
58.4. Springboot 2.1
59. Spring boot with Caching
59.1. maven
59.1.1. Redis
59.2. 启用缓存 @EnableCaching
59.3. 设置缓存 @Cacheable
59.3.1. 多参数处理
59.3.2. 对象参数
59.3.3.
59.3.4. 参数索引
59.3.5. 自动生成 key
59.3.6. SpEL表达式
59.3.7. 排除 null 结果
59.3.8. 排除 empty
59.4. 更新缓存 @CachePut
59.5. 删除缓存 @CacheEvict
59.6. 组合操作 @Caching
59.7. 解决Expire 和 TTL 过期时间
59.8. Cannot serialize
60. Spring boot with Email
60.1. Maven
60.2. Resource
60.3. POJO
60.4. RestController
60.5. Test
61. Spring boot with Hessian
61.1. Maven
61.2. Application
61.3. HessianServiceExporter
61.4. Service
61.5. RestController
62. Spring boot with Async
62.1. Callable 实现异步
62.2. WebAsyncTask 实现异步
62.3. DeferredResult 实现异步返回结果
62.4. 带有返回值的异步任务
62.4.1. Future
62.4.2. CompletableFuture
62.5. 默认简单线程池 SimpleAsyncTaskExecutor
62.5.1. 配置线程池
62.5.2. @Service/@Component 中异步执行
62.5.3. applicationTaskExecutor
62.6. ThreadPoolTaskExecutor 自定义线程池
62.6.1. 最简单的配置
62.6.2. 队列
62.6.3. 定义多个线程池
62.6.4. 实现 AsyncConfigurer 接口方式创建自定义连接池
62.6.5. 继承 AsyncConfigurerSupport 创建自定义连接池
62.6.6. 生产环境完整代码 @Bean 注入方式
62.6.7. 通过 @Bean 覆盖掉 SimpleAsyncTaskExecutor
62.7. 自定义线程池 ThreadPoolExecutor
62.7.1. ThreadPoolExecutor
62.7.2. 注入自定义线程池bean
62.8. 设置线程名称
62.9. 线程池监控
62.10. 注意事项
63. Springboot with Ethereum (web3j)
63.1. Maven
63.2. application.properties
63.3. TestRestController
63.4. 测试
64. Java Record 新特性
64.1. Record 替代 POJO 类
64.2. Record 作为 Properties
64.3. Record 作为实体类
64.4. Record 作为 Service
64.5. Record 作为 Controller
V. Spring Framework
65. Spring 框架
65.1. @Bean
65.1.1. @Scope 定义类型
65.1.2. InitializingBean
65.2. URL 拼装/解析
65.3. ServletUriComponentsBuilder
65.4. URL 路径相关
66. Spring MVC
66.1. @EnableWebMvc
66.1.1. CORS 跨域请求
66.1.2. Spring MVC CORS with WebMvcConfigurerAdapter
66.2. @Controller
66.2.1. @RequestMapping
66.2.2. @GetMapping
66.2.3. @PostMapping
66.2.4. @RequestBody
66.2.5. RequestMapping with Request Parameters - @RequestParam
66.2.6. @RequestHeader - 获取 HTTP Header 信息
66.2.7. RequestMapping with Path Variables - @PathVariable
66.2.8. @MatrixVariable注解,RFC3986定义URI的路径(Path)中可包含name-value片段
66.2.9. @ModelAttribute
66.2.10. @ResponseBody
66.2.11. @ResponseStatus 设置 HTTP 状态
66.2.12. @CrossOrigin
66.2.13. @CookieValue - 获取 Cookie 值
66.2.14. @SessionAttributes
66.2.15. ModelAndView
66.2.16. HttpServletRequest / HttpServletResponse
66.3. @RestController
66.3.1. 接口设计中 URL 参数,FORM 参数,JSON 怎么选择
66.3.2. 返回迭代器
66.3.3. 上传文件
66.3.4. 返回实体
66.3.5. JSON
66.3.6. 处理原始 RAW JSON 数据
66.3.7. 返回 JSON 对象 NULL 专为 "" 字符串
66.3.8. XML
66.3.9. 兼容传统 json 接口
66.3.10. 上传文件
66.3.11. Spring boot with csv
66.3.12. Json 处理
66.3.13. synchronized
66.3.14. Spring boot with Emitter
66.4. View
66.4.1. 配置静态文件目录
66.4.2. 添加静态文件目录
66.4.3. Using Spring’s form tag library
66.4.4. Thymeleaf
66.4.5. FreeMarker
66.4.6. i18n 国际化
66.5. Spring boot with Webpage
66.5.1. Maven
66.5.2. application.properties
66.5.3. Application
66.5.4. IndexController
66.5.5. src/main/webapp/WEB-INF/jsp/index.jsp
66.5.6. 集成模板引擎
66.6. Spring boot with Velocity template
66.6.1. Maven
66.6.2. Resource
66.6.3. Application
66.6.4. RestController
66.6.5. Test
66.7. Spring boot with Thymeleaf
66.7.1. Maven
66.7.2. application.properties
66.7.3. Controller
66.7.4. HTML5 Template
66.8. 校验器(Validator)
66.8.1. 常规用法
66.8.2. 自定义注解
66.9. Interceptor/Filter 拦截器/过滤
66.9.1. Session 拦截
66.9.2. Token 拦截
66.9.3. 过滤器
66.9.4. 拦截器获取PathVariable变量
66.10. String boot with RestTemplate
66.10.1. RestTemplate Example
66.10.2. GET 操作
66.10.3. POST 操作
66.10.4. PUT 操作
66.10.5. Delete 操作
66.10.6. 上传文件
66.10.7. HTTP Auth
66.10.8. PKCS12
66.10.9. Timeout 超时设置
66.11. RestClient
66.11.1. 创建 RestClient
66.11.2. Get 操作
66.11.3. Post Json
66.11.4. HTTP Authorization Basic
66.11.5. onStatus
66.11.6. Timeout 超时设置
66.11.7. 下载二进制流
68. WebFlux framework
68.1. Getting Started
68.1.1. Maven
68.1.2. Application
68.1.3. RestController
68.1.4. 测试
68.2. WebFlux 与 SprintMVC 有什么不同?
68.2.1. 实验程序
68.2.2. 实验结果
68.3. WebFlux Router
68.3.1. Component 原件
68.3.2. 路由配置
68.4. RestController
68.4.1. Post 数据
68.4.2. Thymeleaf
68.5. Webflux Redis
68.5.1. Maven Redis 依赖
68.5.2. Redis 配置
68.5.3. Config
68.5.4. Service
68.5.5.
68.6. Webflux Mongdb
68.6.1. Maven 依赖
68.6.2. Repository
68.6.3. Service
68.6.4. 控制器
68.7. Mono
68.7.1. Mono.just()/Mono.justOrEmpty()
68.7.2. MonoSink 创建 Mono
68.7.3. Supplier 创建 Mono
68.7.4. then()
68.7.5. 异常处理
68.7.6. 同步阻塞等待结果
68.8. Flux 返回多条数据
68.8.1. FluxSink 创建异步 Flux
68.8.2. SynchronousSink 创建同步 Flux
68.8.3. just()
68.8.4. 从 Flux/Mono 创建 Flux
68.8.5. 消息订阅
68.8.6. 从 Flux/Mono 创建 Flux
68.8.7. 从 Iterable 创建 Flux
68.8.8. 从 Stream 创建 Flux
68.8.9. defer()
68.8.10. Flux.interval()
68.8.11. Flux.empty()
68.8.12. Flux.error()
68.8.13. Flux.never()
68.8.14. Flux.range()
68.8.15. 返回数据
68.8.16. 持续更新 Flux
68.8.17. map(), flatMap()
68.8.18. 过滤
68.8.19. 触发操作
68.9. SSE
68.9.1. 一次性事件
68.9.2. 从 Steam 返回数据
68.9.3. 周期性事件
68.9.4. 返回 ServerSentEvent 数据结构
68.9.5. SSE 完整的例子
68.9.6. SSE Client 订阅实例
68.10. 并发
68.11. ConnectableFlux
68.12. WebClient
68.12.1. 配置 WebClient
68.12.2. @Controller/@RestController 实例
68.12.3. Get 请求实例
68.12.4. URI 参数
68.12.5. 查询参数
68.12.6. Post 操作演示
68.12.7. Post 表单数据
68.12.8. 上传文件
68.12.9. 设置 HTTP 头
68.12.10. 同步阻塞等待返回结果
68.12.11. websocket
68.12.12. 获取 HTTP 链接状态
68.12.13. Http Base Authentication - 401 Unauthorized
68.12.14. 订阅 SSE
68.12.15. 超时时间
68.12.16. share() 共享订阅数据
68.12.17. 打印调试日志
68.12.18. org.springframework.web.context.request.async.AsyncRequestNotUsableException: ServletOutputStream failed to flush: java.io.IOException: Broken pipe
68.13. Webflux 安全
68.13.1. Token 拦截器
68.13.2. JWT
68.13.3. spring-boot-starter-security
68.14. 常见问题
68.14.1. The Java/XML config for Spring MVC and Spring WebFlux cannot both be enabled, e.g. via @EnableWebMvc and @EnableWebFlux, in the same application.
68.14.2. @EnableWebFluxSecurity 与 @EnableReactiveMethodSecurity 不生效
68.14.3. webflux netty 不支持 Content-Type: application/x-www-form-urlencoded
69. Service
69.1. Application
69.2. 定义接口
69.3. 实现接口
69.4. 调用 Service
69.5. context.getBean 调用 Service
69.6. AopContext
69.7. Service 单例/多例模式
69.7.1. Service 是单例模式
69.7.2. Service 多例实现
69.8. 构造方法
70. Tomcat Spring 运行环境
70.1. Maven
70.2. Spring MVC configuration
70.3. Tomcat
70.4. 集成 Mybatis
70.4.1. pom.xml
70.4.2. properties
70.4.3. dataSource
70.4.4. SqlSessionFactory
70.4.5. Mapper 扫描
70.4.6. Mapper 单一class映射
70.4.7. Service
70.4.8. 测试实例
VI. Spring Data
71. EntityManager
72. Spring Data with JdbcTemplate
72.1. execute
72.2. queryForInt
72.3. queryForLong
72.4. queryForObject
72.4.1. 返回整形与字符型
72.4.2. 查询 Double 类型数据库
72.4.3. 返回日期
72.4.4. 返回结果集
72.4.5. 通过 "?" 向SQL传递参数
72.4.6. RowMapper 记录映射
72.5. queryForList
72.5.1. Iterator 用法
72.5.2. for 循环
72.5.3. forEach 用法
72.6. queryForMap
72.7. query
72.7.1. ResultSet
72.7.2. ResultSetExtractor
72.7.3. RowMapper
72.8. queryForRowSet
72.9. update
72.10. MapSqlParameterSource
72.11. 实例参考
72.11.1. 参数传递技巧
73. Spring Data with MySQL
73.1. 选择数据库表引擎
73.2. 声明实体
73.2.1. @Entity 声明实体
73.2.2. @Table 定义表名
73.2.3. @Id 定义主键
73.2.4. @Column 定义字段:
73.2.5. 非数据库字段
73.2.6. @Lob 注解属性将被持久化为 Blog 或 Clob 类型
73.2.7. @NotNull 不能为空声明
73.2.8. @Temporal 日期定义
73.2.9. 创建日期
73.2.10. @DateTimeFormat 处理日期时间格式
73.2.11. Enum 枚举数据类型
73.2.12. SET 数据结构
73.2.13. JSON 数据类型
73.2.14. 嵌入
73.2.15. @JsonIgnore
73.2.16. @EnableJpaAuditing 开启 JPA 审计功能
73.2.17. 注释 @Comment
73.2.18. @Pattern 数据匹配
73.2.19. 实体继承
73.3. 映射集合属性
73.3.1. List 集合
73.3.2. 数组集合
73.3.3. Map 集合
73.3.4. Set 集合
73.3.5. 外键名称
73.3.6. 集合表子查询
73.4. 外键
73.4.1. @JoinColumn
73.4.2. @OneToOne
73.4.3. OneToMany 一对多
73.4.4. ManyToMany 多对多
73.4.5. 外键级联删除
73.4.6. 外键级联操作
73.4.7. @JoinTable
73.4.8. @OrderBy
73.4.9. @JsonIgnoreProperties
73.4.10. 允许外键为 NULL
73.4.11. 只要外键,不要数据结构
73.5. 索引
73.5.1. 普通索引
73.5.2. 组合索引
73.5.3. 唯一索引
73.6. Repository
73.6.1. JpaRepository
73.6.2. CrudRepository
73.6.3. PagingAndSortingRepository
73.6.4. findByXXX
73.6.5. count 操作
73.6.6. delete 删除操作
73.6.7. IsNull
73.6.8. In/NotIn
73.6.9. TRUE / FALSE
73.6.10. OrderBy
73.6.11. GreaterThan
73.6.12. Sort 排序操作操作
73.6.13. Pageable 翻页操作
73.6.14. @DynamicInsert 与 @DynamicUpdate
73.6.15. 继承已存在的 Repository
73.6.16. 自定义返回字段
73.7. TransactionTemplate
73.8. JPQL @Query
73.8.1. @Modifying 更新/删除
73.8.2. 参数传递
73.8.3. 原生 SQL 操作
73.8.4. @Query 与 Pageagble
73.8.5. 返回指定字段
73.8.6. 返回指定的模型
73.8.7. @Query 与 @ManyToOne
73.8.8. Collection
73.8.9. Sort
73.8.10. 更新数据,返回值
73.8.11. 锁 @Lock
73.8.12. Sum 求和
73.8.13. IFNULL
73.9. 事务 @Transactional
73.9.1. save() 不需要开启 @Transactional
73.9.2. SERIALIZABLE
73.9.3. readOnly
73.9.4. 删除更新需要 @Transactional 注解
73.9.5. 回滚操作
73.9.6. private、default、protected 和 final 不支持事物
73.9.7. Service 注意事项
73.9.8. 需要 @Service 注解配合使用
73.9.9. 事务回滚
73.10. FAQ 常见问题
73.10.1. Could not write JSON: failed to lazily initialize a collection of role
73.10.2. Query did not return a unique result: 2 results were returned
73.10.3. Executing an update/delete query
73.10.4. could not initialize proxy [cn.netkiller.domain.Device#16] - no Session
73.10.5. this is incompatible with sql_mode=only_full_group_by
74. Spring Data with Redis
74.1. 集成 Redis XML 方式
74.1.1. pom.xml
74.1.2. springframework-servlet.xml
74.1.3. Controller
74.1.4. index.jsp
74.1.5. 测试
74.2. 通过构造方法实例化 Redis
74.3. stringRedisTemplate 基本用法
74.4. RedisTemplate
74.4.1. 设置缓存时间
74.4.2. increment
74.4.3. 删除 key
74.4.4. 对象存储
74.4.5. 获取过期时间
74.4.6. 过期时间未执行
74.5. ValueOperations
74.5.1. 字符串截取
74.5.2. 追加字符串
74.5.3. 设置键的字符串值并返回其旧值
74.5.4. 返回字符串长度
74.5.5. 如果key不存便缓存。
74.5.6. 缓存多个值 /获取多个值 multiSet / multiGet
74.5.7. setBit / getBit 二进制位操作
74.6. 列表操作
74.6.1. rightPush
74.6.2. rightPushAll
74.6.3. rightPushIfPresent
74.6.4. leftPush
74.6.5. leftPushAll
74.6.6. range
74.7. SetOperations 数据类型
74.7.1. 返回集合中的所有成员
74.7.2. 取出一个成员
74.7.3. 随机获取无序集合中的一个元素
74.7.4. 随机获取 n 个成员(存在重复数据)
74.7.5. 随机获取 n 个不重复成员
74.7.6. 在两个 SET 间移动数据
74.7.7. 成员删除
74.7.8. 返回集合数量
74.7.9. 判断元素是否在集合成员中
74.7.10. 对比两个集合求交集
74.7.11. 对比两个集合求交集,然后存储到新的 key 中
74.7.12. 合并两个集合,并去处重复数据
74.7.13. 合并两个集合去重复后保存到新的 key 中
74.7.14. 计算两个合集的差集
74.7.15. 计算两个合集的差集,然后保存到新的 key 中
74.7.16. 遍历 SET 集合
74.8. ZSetOperations 有序的 set 集合
74.9. HashOperations
74.9.1. put
74.9.2. putAll
74.9.3. 从键中的哈希获取给定hashKey的值
74.9.4. delete
74.9.5. 确定哈希hashKey是否存在
74.9.6. 从哈希中获取指定的多个 hashKey 的值
74.9.7. 只有hashKey不存在时才能添加值
74.9.8. 获取整个Hash
74.9.9. 获取所有key
74.9.10. 通过 hashKey 获取所有值
74.9.11. 值加法操作
74.9.12. 遍历 Hash 表
74.10. 存储 Json 对象
74.10.1. 集成 RedisTemplate 定义新类 JsonRedisTemplate
74.10.2. 配置 Redis
74.10.3. 测试
74.11. Spring Data Redis - Repository Examples
74.11.1. @EnableRedisRepositories 启动 Redis 仓库
74.11.2. 定义 Domain 类
74.11.3. Repository 接口
74.11.4. 测试代码
74.12. CacheService
74.13. FAQ
74.13.1. Spring Data Redis
75. Spring Data with MongoDB
75.1. Example Spring Data MongoDB
75.1.1. pom.xml
75.1.2. springframework-servlet.xml
75.1.3. POJO
75.1.4. Controller
75.1.5. 查看测试结果
75.1.6. 条件查询
75.2. MongoDB 多数据源
75.2.1. Maven
75.2.2. Application 禁止自动配置 MongoDB
75.2.3. application.properties 新增配置项
75.2.4. MongoDB 配置类
75.2.5. 创建 Document 关系映射类
75.2.6. 测试控制器
75.2.7. 测试
75.3. @Document
75.3.1. 指定表名
75.3.2. @Id
75.3.3. @Version
75.3.4. @Field 定义字段名
75.3.5. @Indexed
75.3.6. @CompoundIndex 复合索引
75.3.7. @TextIndexed
75.3.8. @GeoSpatialIndex 地理位置索引
75.3.9. @Transient 丢弃数据,不存到 mongodb
75.3.10. @DBRef 做外外键引用
75.3.11. @DateTimeFormat
75.3.12. @NumberFormat
75.3.13. 在 @Document 中使用 Enum 类型
75.3.14. 在 @Document 中定义数据结构 List/Map
75.3.15. GeoJson 数据类型
75.4. MongoRepository
75.4.1. 扫描仓库接口
75.4.2. findAll()
75.4.3. deleteAll()
75.4.4. save()
75.4.5. count()
75.4.6. exists() 判断是否存在
75.4.7. existsById()
75.4.8. findByXXXX
75.4.9. findAll with OrderBy
75.4.10. findAll with Sort
75.4.11. FindAll with Pageable
75.4.12. StartingWith 和 EndingWith
75.4.13. Between
75.4.14. Before / After
75.4.15. @Query
75.5. mongoTemplate
75.5.1. Save 保存
75.5.2. Insert
75.5.3. updateFirst 修改符合条件第一条记录
75.5.4. updateMulti 修改符合条件的所有
75.5.5. 查找并保存
75.5.6. upsert - 修改符合条件时如果不存在则添加
75.5.7. 删除
75.5.8. 查找一条数据
75.5.9. 查找所有数据
75.5.10. Query
75.5.11. Criteria
75.5.12. Update
75.5.13. BasicUpdate
75.5.14. Sort
75.5.15. Query + PageRequest
75.5.16. newAggregation
75.5.17. 创建索引
75.5.18. 子对象操作
75.6. GeoJson 反序列化
75.7. FAQ
75.7.1. location object expected, location array not in correct format; nested exception is com.mongodb.MongoWriteException: location object expected, location array not in correct format
76. Spring Data with Elasticsearch
76.1. 内嵌 Elasticsearch
76.1.1. Maven
76.1.2. src/main/resources/application.properties
76.1.3. Domain Class
76.1.4. ElasticsearchRepository
76.1.5. SearchRestController
76.1.6. 测试
76.2. 集群模式
76.3. Document
76.4. Elasticsearch 删除操作
76.5. FAQ
76.5.1. java.lang.IllegalStateException: Received message from unsupported version: [2.0.0] minimal compatible version is: [5.0.0]
77. Spring boot with Data restful
77.1. Maven
78. Apache ShardingSphere
78.1. 微服务集群环境,雪花算法出现重复ID
78.1.1. 方案一、配置实现
78.1.2. 方案二、代码实现
VII. Spring Security
79. Springboot 3 + Security 6
79.1. Spring Security with HTTP Auth
79.1.1. 默认配置
79.1.2. 设置用户名和密码
79.1.3. 禁用 Security
79.1.4. 设置角色
79.2. Springboot 3 Security + OncePerRequestFilter
79.2.1. OncePerRequestFilter
79.2.2. SecurityConfiguration
79.3. SecurityFilterChain
79.4. @PreAuthorize
79.4.1. hasRole
79.4.2. hasAnyRole
79.4.3. 从 HttpServletRequest 返回的 request 变量中判断角色
79.4.4. getAuthentication() 获得角色
79.4.5. UserDetailsService
79.5. httpBasic 配置
79.6. InvalidClaimException: The Token can't be used before
80. Spring Authorization Server
80.1. Oauth2 协议
80.1.1. token
80.1.2. grant_type
80.1.3. 授权码授权模式(Authorization Code Grant)
80.1.4. 密码模式(Resource Owner Password Credentials Grant)
80.1.5. 客户端凭证模式(Client Credentials Grant)
80.1.6. 刷新 TOKEN 方式
80.2. Maven 依赖
80.3. Spring cloud with Oauth2
80.3.1. authorization_code
80.3.2. Spring boot with Oauth2 - Password
80.3.3. Spring boot with Oauth2 jwt
80.3.4. Spring boot with Oauth2 jwt 非对称证书
80.3.5. Apple iOS 访问 Oauth2
80.3.6. Oauth2 客户端
80.3.7. Android Oauth2 + Jwt example
80.3.8. RestTemplate 使用 HttpClient
80.3.9. 自签名证书信任问题
80.3.10. Principal
80.3.11. SecurityContextHolder 对象
80.3.12. 资源服务器配置
80.3.13. Client
80.3.14. Oauth2 常见问题
81. Spring boot with Spring security(2.x)
81.1. Spring security 静态配置例子
81.1.1. Maven
81.1.2. Reource
81.1.3. Application
81.1.4. WebSecurityConfigurer
81.1.5. RestController
81.1.6. 测试
81.2. Spring + Security + MongoDB
81.2.1. Account
81.2.2. AccountRepository
81.2.3. WebSecurityConfiguration
81.3. Spring Boot with Web Security(2.x)
81.3.1. EnableWebSecurity
81.3.2. Web静态资源
81.3.3. 正则匹配
81.3.4. 登陆页面,失败页面,登陆中页面
81.3.5. CORS
81.3.6. X-Frame-Options 安全
81.4. 访问控制列表(Access Control List,ACL)
81.4.1. antMatchers
81.4.2. HTTP Auth
81.4.3. Rest
81.4.4. hasRole
81.4.5. hasAnyRole()
81.4.6. withUser
VIII. Spring Cloud
82. Spring Cloud
82.1. Spring Cloud 相关的 application.properties 配置
82.1.1. 启用或禁用 bootstrap
82.1.2. bootstrap.properties 配置文件
83. Spring Cloud Config
83.1. Maven 项目 pom.xml 文件
83.2. Server
83.2.1. Maven config 模块
83.2.2. Application
83.2.3. application.properties
83.2.4. Git 仓库
83.2.5. 测试服务器
83.3. Client
83.3.1. Maven pom.xml
83.3.2. Application
83.3.3. bootstrap.properties
83.3.4. 测试 client
83.4. Config 高级配置
83.4.1. 仓库配置
83.4.2. Config server 用户认证
83.4.3. 加密敏感数据
83.4.4. Spring Cloud Config JDBC Backend
83.5. Old
83.5.1. Server (Camden.SR5)
83.5.2. Client (Camden.SR5)
84. Spring Cloud Consol
84.1. Spring Cloud Consul 配置
84.2. Maven 父项目
84.3. Consul 服务生产者
84.3.1. Maven
84.3.2. application.properties
84.3.3. SpringApplication
84.3.4. TestController
84.4. Consul 服务消费者
84.4.1. Maven
84.4.2. application.properties
84.4.3. SpringApplication
84.4.4. TestController
84.5. Openfeign
84.5.1. Maven
84.5.2. application.properties
84.5.3. SpringApplication
84.5.4. Feign 接口
84.5.5. TestController
85. Spring Cloud Netflix
85.1. Eureka Server
85.1.1. Maven
85.1.2. Application
85.1.3. application.properties
85.1.4. 检查注册服务器
85.2. Eureka Client
85.2.1. Maven
85.2.2. Application
85.2.3. RestController
85.2.4. application.properties
85.2.5. 测试
85.3. Feign client
85.3.1. Maven
85.3.2. Application
85.3.3. interface
85.3.4. application.properties
85.3.5. 测试
85.3.6. fallback
85.4. 为 Eureka Server 增加用户认证
85.4.1. Maven
85.4.2. application.properties
85.4.3. Eureka Client
85.4.4. Feign Client
85.5. Eureka 配置项
85.5.1. /eureka/apps
85.5.2. Eureka instance 配置项
85.5.3. Eureka client 配置项
85.5.4. Eureka Server配置项
85.6. ribbon
85.6.1.
85.6.2. LoadBalancerClient 实例
85.6.3. Ribbon 相关配置
85.7. 获取 EurekaClient 信息
85.8. Zuul
85.8.1. Maven
85.8.2. EnableZuulProxy
85.8.3. application.yml
85.8.4. 负载均衡配置
86. Openfeign
86.1. Openfeign 扫描包配置
86.2. 用户认证
86.3. 应用实例
86.4. 配置连接方式
86.4.1. httpclient
86.4.2. okhttp
86.5. 配置手册
87. Spring Cloud Gateway
87.1. Gateway 例子
87.1.1. Maven
87.1.2. SpringApplication
87.1.3. application.yml
87.1.4. RouteLocator 方式
87.2. 路由配置
87.2.1. 转发操作
87.2.2. URL 参数
88. Spring Cloud Sleuth
88.1. logback 安装
89. Spring Cloud with Kubernetes
89.1. Config
89.1.1. Maven 依赖
89.1.2. Spring Cloud 配置文件
89.1.3. 程序文件
89.1.4. Kubernetes 编排脚本
89.1.5. 测试
89.2. 注册发现
89.2.1. Maven 父项目
89.2.2. provider
89.2.3. consumer
89.2.4. 测试
89.2.5.
90. Spring Cloud Alibaba
90.1. 安装 Nacos
90.1.1. Docker 安装 Nacos
90.1.2. Kubernetes 安装 Nacos
90.1.3. IP限制,白名单
90.1.4. 防火墙配置
90.2. Kubernetes 部署微服务
90.2.1. pom.xml 中加入 docker 插件
90.2.2. 容器启动脚本
90.2.3. 构建 docker 镜像
90.2.4. 编排 kubernetes 容器
90.2.5. 启动指定 nacos
90.3. Nacos 配置中心/注册中心代码实例
90.3.1. Maven
90.3.2. SpringBootApplication
90.3.3. ConfigController
90.3.4. 配置文件
90.4. FAQ
90.4.1. 禁用 Nacos
90.4.2. 禁止注册
90.4.3. Failed to bind properties under 'server.tomcat.basedir' to java.io.File:
90.4.4. 不读取 bootstrap.yaml 文件
90.4.5. WARN [com.alibaba.nacos.client.naming:177] [,] - out of date data received, old-t: 1665711914993, new-t: 1665711902390
90.4.6. User limit of inotify instances reached or too many open files
90.4.7. 开启权限
90.4.8. ERROR Whitelabel
90.4.9.
91. FAQ
91.1. Cannot execute request on any known server
91.2. @EnableDiscoveryClient与@EnableEurekaClient 区别
91.3. Feign请求超时
91.4. 已停止的微服务节点注销慢或不注销
91.5. Feign 启动出错 PathVariable annotation was empty on param 0.
91.6. Feign 提示 Consider defining a bean of type 'common.feign.Cms' in your configuration.
91.7. Load balancer does not have available server for client
91.8. Eureka Client (Dalston.SR1)
91.8.1. Maven
91.8.2. Application
91.8.3. RestController
91.8.4. application.properties
91.8.5. 测试
91.9. Config Server(1.3.1.RELEASE)
91.9.1. Server
91.9.2. Client
91.10. feign.RetryableException: Read timed out executing
92. Spring Integration
92.1. Spring Redis Lock
92.1.1. Maven 依赖
92.1.2. 配置锁
92.1.3. 使用方法
92.2. MQTT Support
92.2.1. 入站消息通道适配器
92.2.2. 出站通道适配器
92.2.3. @MessagingGateway 定义消息网管接口
92.2.4. 手动 ACK 应答
92.2.5. Spring boot with Mqtt v5
93. MyBatis
93.1. Mybatis 入门
93.2. 接口注解
94. Apache Struts
94.1. struts.xml
94.1.1. include
94.2. Struts Tags
94.2.1. property
94.2.2. set
94.2.3. url
94.2.4. s:include
94.2.5. s:action
94.2.6. HTML Form
94.2.7. iterator
94.2.8. if elseif else
94.3. Action
94.3.1. redirect
94.3.2. redirectAction
94.3.3. JSON
94.3.4. 传递 Timestamp 变量
94.4. Ajax + JSON
94.4.1. GET/POST JSON
94.5. Json 内容展示
94.5.1. 禁止方法
94.5.2. 格式化日期
94.5.3. 重命名变量名
94.5.4. org.apache.struts2.json
94.6. Interceptor
94.6.1. Session
94.7. Action 中使用线程
94.8. 日志
94.9. FAQ
94.9.1. Struts 怎样判断用户来自电脑还是移动设备
95. Apache Tiles
95.1. 配置 Tiles
95.1.1. Maven
95.1.2. web.xml
95.2. Template 配置模板
95.3. Struts tiles
96. Play
97. Servlet
97.1. Example
97.2. Session
97.3. HttpServletRequest
97.4. Filter
97.4.1. web.xml
97.4.2. Filter 类
97.5. Listener
97.5.1. web.xml
97.5.2. NewsListener 类
97.5.3. NewsTask 类
97.5.4. JSP 中心显示
97.6. JSP
97.6.1. 注释
97.6.2. pageContext
97.6.3. request
97.6.4.
97.6.5. cookie
97.6.6. session
97.6.7. page
97.6.8. trimDirectiveWhitespaces
97.6.9. include
97.6.10. jsp
97.6.11. error-page
97.6.12. JSP 编程
97.6.13. FAQ
97.7. JSTL(JavaServer Pages Standard Tag Library)
97.7.1. c:set
97.7.2. c:out
97.7.3. c:url
97.7.4. c:redirect
97.7.5. c:import
97.7.6. c:if
97.7.7. c:choose
97.7.8. c:forEach
97.7.9. empty 判断是否为空
97.7.10. JSTL fmt Tag setBundle Example
97.8. WebSocket
97.8.1. Server
97.8.2. Client
98. Log
98.1. Logback
98.1.1. Maven 包
98.1.2. Example
98.2. slf4j
98.3. log4j
98.3.1. 安装 Log4j
98.3.2. log4j 环境变量
98.3.3. Log4j Example
98.3.4. log4j.properties
99. AMQP(Advanced Message Queuing Protocol)
99.1. Send and Recv
99.2. direct
100. NoSQL
100.1. MongoDB
100.1.1. pom.xml
100.1.2. 插入操作
100.1.3. 读取操作
101. Elasticsearch API
101.1. Client
101.2. insert
101.3. Get
101.4. delete
101.5. Search
101.6. Query 查询
101.6.1. match all 匹配所有数据
101.6.2. match 匹配查询
101.6.3. match phrase 短语精准匹配
101.7. Filter 过滤
101.7.1. term
101.7.2. range
101.8. Sorting
101.9. 返回 Source 字段
101.10. Count
101.11. Example 范例
101.11.1. Spring boot 案例
101.12. FAQ
101.12.1. 显示查询 JSON 字符串
102. Jersey - RESTful Web Services in Java.
102.1. Client 2.x
102.1.1. Maven 版本
102.1.2. GET 操作
102.1.3. GET + Auth 用户认证
102.2. Client 1.x
102.2.1. Jersey + Auth + HTTP2 + SSL
103. Apache HttpComponents
103.1. org.apache.commons.lang3
103.1.1. HTML 标签处理
103.1.2. StringUtils.join 使用特定字符链接字符串
103.1.3. RandomStringUtils
103.2. commons-text
103.2.1. 禁止转译 json
103.3. Apache HttpClient
103.3.1. Maven
103.3.2. HTTP POST 操作
103.3.3. HTTPS
103.3.4. HTTP/2
103.3.5. Java11
103.3.6. Host name 'api.netkiller.cn' does not match the certificate subject provided
103.3.7. HttpStatus
103.3.8.
104. Cache
104.1. java memcached client
104.2. Jedis
104.2.1. 认证
104.2.2. jedis.keys
104.3. Ehcache
105. Kafka
105.1. 安装 Kafka 环境
105.2. Maven
105.3. 启动 kafka
105.4. 入门例子
105.4.1. 订阅例子
105.4.2. 发布例子
105.5. 线程例子
106. Software Development Kit
106.1. JAVE(Java Audio Video Encoder)
106.2. Google
106.2.1. com.google.gson
106.2.2. Guava
106.3. Mahout
106.3.1. 推荐系统
106.4. Hessian
106.5. quartz-scheduler
106.6. Redisson
IX. Android
107. Android Studio
107.1. 卸载 Android Studio
107.2. 代码格式化
107.3. 设置兼容最低SDK版本
107.4. SDK Tools
107.4.1. 接受 License
107.4.2. 查看 SDK 列表
107.4.3. 按照 Android SDK
107.5. 命令行操作
107.6. adb 命令
107.6.1. 获得 root 权限
107.6.2. 设备管理
107.6.3. Shell
107.6.4. 设备 ID
107.6.5. 查看安卓版本
107.6.6. Logcat
107.6.7. 上传文件
107.6.8. 下载文件
107.6.9. 安卓 .apk bk
107.6.10. 屏幕尺寸
107.6.11. dump 系统信息
107.6.12. 解锁
107.6.13. 蓝牙管理
108. AndroidManifest.xml
108.1. SDK 版本配置
108.2. 开启网络
108.3. 文件存储权限
108.4. 相机权限
108.5. GPS 定位权限
108.6. 全屏-无标题
108.7. 设置为默认开机启动
108.8. 开机启动
108.9. 默认横屏
108.10. 禁止屏幕旋转变化
109. 设备
109.1. 环境变量
109.1.1. 扩展存储
109.1.2. 下载缓存目录
109.1.3. 数据目录
109.2. 配置文件
109.2.1. *.properties 文件
109.2.2. 再 AndroidManifest.xml 使用 meta-data element 定义
109.2.3. 再 build.gradle 文件中配置 productFlavors
109.2.4. 从 assets 目录读取配置文件
109.3. 设备信息
109.4. Physical density
109.5. 声卡
109.5.1. 播放
109.5.2. 录音
109.5.3. 查看声卡信息
109.5.4. /proc/asound 设备信息
109.5.5. 查看声卡当前占用设备
109.5.6. tinymix 设置声卡参数
109.5.7. 麦克风阵列调试
110. Activity
110.1. 定义 UI
110.2. 隐藏虚拟键
110.3. 显式四种跳转方式
110.3.1. startActivity()
110.4. 定时关闭
110.5. 恢复触发
110.6. 返回触发
110.7. 保持屏幕常开
110.8. 标题栏添加返回按钮
110.9. Activity 间数据传递
110.9.1. Intent 方式
110.9.2. Bundle 方式
110.9.3. Flag 属性
110.9.4. 返回值
110.10. intentActivityResultLauncher 跳转
110.11. startActivityForResult 替代方案
110.11.1. 返回值
110.12. Activity 关闭
110.12.1. 退出 App
110.13. DataBinding
110.14. App 间跳转
110.15. 键盘事件
110.15.1. onKeyDown 键盘按下事件
110.15.2. dispatchKeyEvent
110.15.3. 屏蔽 KeyEvent.KEYCODE_BACK
110.15.4. 判断按下次数
110.16. 鼠标事件
110.17. 重启自己
110.18. Res 资源
110.18.1. 通过名称查找 layout ID
110.18.2. 查找 drawable 资源 ID
110.18.3. 获取 color 颜色 ID
110.18.4. 获取 array.xml 文件下某个字段的 ID
110.18.5. 获取 style.xml 文件下的某个样式的 id
111. Fragment
111.1. 启动 Fragment
111.2. 关闭 Fragment
111.3. 在 Fragment 中使用 findViewById
111.4. 在 Fragment 中使用 Intent 跳转
111.5. Fragment 中调用 getPackageManager()
111.6. 在 Fragment 中使用 runOnUiThread
111.7. Fragment 中调用 findViewById
111.8. 替换 FrameLayout
111.9. Fragment 接收 BroadcastReceiver 广播
111.10. Fragment 加载报错 java.lang.IllegalArgumentException: No view found for id ...
112. Resources
112.1. strings.xml
112.1.1. 字符串
112.1.2. 定义数组
112.1.3. 获取 Resource
112.1.4. Fragment 获取 Resource
112.2. dimens.xml
113. Palette 视觉设计
113.1. 通用设置
113.1.1. 颜色设置
113.1.2. 禁止屏幕休眠
113.1.3. 渐变背景色
113.2. 样式布局
113.2.1. ConstraintLayout
113.2.2. LinearLayout
113.2.3. FrameLayout
113.2.4. 声音波形图
113.3. UI 界面
113.3.1. Toast
113.3.2. Dialog
113.3.3. DatePicker
113.4. Text
113.4.1. Text 相关属性
113.4.2. TextView
113.4.3. EditText
113.4.4. 光标移动到行尾
113.4.5. 禁止选择文本
113.4.6. EditText 属性设置
113.4.7. 设置 app:backgroundTint
113.5. Button
113.5.1. 启用禁用
113.5.2. 实现 OnClickListener 接口
113.5.3. Fragment 中使用 Button
113.5.4. 圆形按钮
113.5.5. ImageButton
113.6. Switch
113.7. Widgets
113.7.1. ImageView
113.7.2. TextClock
113.7.3. 进度条
113.8. Containers
113.8.1. CardView
113.8.2. RecyclerView
113.8.3. NavigationView
113.8.4. 底部导航
113.8.5. TabLayout
113.8.6. ViewPager2
113.9. 屏幕
113.9.1. 尺寸
113.9.2. 全屏显示
113.9.3. 屏幕触摸事件 onTouch(View view, MotionEvent motionEvent)
113.9.4. 手势事件
113.9.5. SimpleOnGestureListener
113.9.6. SimpleOnScaleGestureListener
113.10. 带有小三角指示的消息框
113.10.1. 左侧三角
113.10.2. 右侧三角
113.10.3. 正三角
113.10.4. 倒三角
113.10.5. 文本边框
113.10.6. 布局
114. Schedule 计划任务
114.1. 延迟执行
114.2. Time 和 TimerTask 定时刷新
114.3. 使用 Runnable 和 Handler 实现定时执行
114.4. 循环执行
114.5. TimerTask 实现循环播放
114.6. TimerTask 更新 UI
115. Internationalization i18n with Android (国际化)
115.1. 创建国际化文件
115.2. strings.xml 文件
115.3. 翻译语言
115.4. 引用国际化文件
115.5. 切换语言
116. 存储
116.1. 存储目录
116.2. FileProvider 配置
116.3. SharedPreferences
116.3.1. 操作模式
116.3.2. 保存数据
116.3.3. 读取数据
116.3.4. 通过 key 查询数据是否存在
116.3.5. 删除数据
116.3.6. 清空数据
116.3.7. 对象存储
116.3.8. SharedPreferences 读取物理存储文件
116.4. SD Card
116.4.1. SD Card 状态
116.4.2. Android 11 申请 sdcard 权限
116.5. android.os.FileUriExposedException
117. 网络
117.1. Wifi 配置
117.2. OkHttp - An HTTP & HTTP/2 client for Android and Java applications
117.2.1. Gradle
117.2.2. AndroidManifest.xml 开启网络访问权限
117.2.3. okhttp 默认是 HTTPS 开启 HTTP
117.2.4. 连接池
117.2.5. GET
117.2.6. POST
117.2.7. HTTP PUT 请求
117.2.8. http header 相关设置
117.2.9. HTTP Base Auth
117.2.10. HttpUrl.Builder 组装 URL 地址参数
117.2.11. Android Activity Example
117.2.12. Android Oauth2 + Jwt example
117.2.13. HTTP/2
117.2.14. 异步更新 UI
117.2.15. SSE 客户端
117.2.16. WebSocket Client
118. 相机与相册
118.1. manifest 文件
118.2. layout
118.3. Activity
118.4. LED flash 做手电筒
119. 麦克风与录音
119.1. 开启麦克风和SD卡权限
119.2. layout
119.3. Activity
120. 多媒体开发
120.1. MediaPlayer
120.1.1. 播放Raw下的元数据
120.1.2. 播放assets文件夹中的音乐
120.1.3. 播放互联网音乐
120.1.4. 使用单例模式
120.1.5. 设置速度,快进播放
120.2. VideoView 开发
120.2.1. 播放网络视频
120.2.2. MediaController 添加翻页事件
120.2.3. 静音播放视频
120.2.4. 更新进度条
120.2.5. 完整的例子
120.2.6. 循环播放
120.2.7. 静音播放
120.3. SoundPool
120.4. 音量控制
120.5. SurfaceView
120.6. Vitamio
121. 定位
121.1. GPS + 网络 定位
121.1.1. manifest 权限配置
121.1.2. layout
121.1.3. Activity
121.2. 只从 GPS 获取定位
122. 电话
122.1. SIM 卡状态
122.2. 通信录与拨打电话
122.3. 发送短信
123. 消息广播
123.1. 动态注册
123.2. 静态注册
123.2.1. 电源管理
123.2.2. 接收不到消息
123.3. 自定义用户消息广播
123.4. 本地广播
123.5. 动态监听广播
123.6. 广播重复接收
123.7. 指定静态广播接收者
123.8. 异步执行广播
123.9. 静态广播接收不到信息
124. Service 服务
124.1. Service的基本用法
124.1.1. manifest 文件
124.1.2. 创建 Service
124.1.3. Layout 代码
124.1.4. Activity 代码
124.2. Service 中启动线程
124.3. Service 和 Activity 通信
124.3.1. Layout
124.3.2. Service
124.3.3. Activity
124.4. Service 和 Toast
124.5. Service 中启动 Activity
124.6. Service 中更新 UI
124.7. 前台启动 Service
124.8. 在 Fragment 中启动 Service
125. Notification 通知中心
125.1. 文本通知
125.2. 添加点击操作
125.3. Notification 给 Activity 传值
125.4. 通过 isNotification 判断是否需要执行 onStop() 和 onDestroy()
126. NFC (Near field communication)
126.1. AndroidManifest.xml 文件配置
126.2. Loyout 文件
126.3. Activity 文件
127. 图形开发
127.1. Paint
127.1.1. Paint.setTextSize() SP to PX
127.2. AnimationDrawable
128. 下载管理
128.1. 从 URL 下来文件
128.2. 安装 APK
128.3. 下载后接收广播通知
129. Android 多线程
129.1. Sleep
129.2. GPIO
129.3. 消息队列
129.3.1. 非阻塞队列 ConcurrentLinkedQueue
130. EventBus
130.1. 添加 EventBus 依赖到项目Gradle文件
130.2. 快速开始一个演示例子
130.2.1. 创建 MessageEvent 类
130.2.2. Layout
130.2.3. Activity
130.3. Sticky Events
130.3.1. MainActivity
130.3.2. StickyActivity
130.3.3. MessageEvent
130.3.4. 删除粘性事件
130.4. 线程模型
130.5. 配置 EventBus
130.6. 事件优先级
130.7. 捕获异常事件
131. Android MQTT
131.1. build.gradle 添加依赖包
131.2. AndroidManifest.xml
131.3. Android Mqtt v5 例子
132. 安卓开发版
132.1. rk3568
132.1.1. 声卡
133. 杂项
133.1. Caused by: java.net.UnknownServiceException: CLEARTEXT communication to 47.100.253.187 not permitted by network security policy
133.2. 设计模式
133.2.1. 单例模式
133.3. Android OS 包
133.3.1. 进程ID
133.3.2. handler
133.4. fastjson android
133.4.1. 对象转字符串
133.4.2. JsonObject 转对象
133.4.3. 字符串 与 json 互转
133.4.4. json 转 数组
133.4.5. JSON数组转List
133.4.6. Map 与 Json 互转
133.5. Butter Knife
133.6. Android Things
133.6.1. GPIO
134. FAQ
134.1. java.net.UnknownServiceException: CLEARTEXT communication to 192.168.0.185 not permitted by network security policy
134.2. Caused by: android.os.NetworkOnMainThreadException
134.3. java.lang.IllegalStateException: Player is accessed on the wrong thread.
134.4. Manifest merger failed with multiple errors, see logs
134.5. android.os.NetworkOnMainThreadException
134.6. package does not have vibrate permission
135. 讯飞云
135.1. AIUI
135.1.1. AIUIPlayer
135.1.2. 酷我音乐
135.1.3. 控制技能
135.1.4. 唤醒词
135.1.5. 汉字转拼音
135.2. 讯飞 TTS
135.2.1. 设置日志输出级别
135.2.2. 流式语音合成
135.3. 语音唤醒
135.3.1. 范例
1. 附录
1.1. 一致性算法

范例清单

1.1. /etc/profile.d/java.sh
23.1. Maven properties
23.2. 将本地 lib/*.jar 包添加到项目中
23.3. 将本地 src/resources 打包到项目
23.4. Maven parent
23.5. watir-webdriver example
37.1. Example Spring boot with Oracle
8. RedisTemplate
45.1. Spring boot with Apache kafka.
45.2. Spring boot with Apache kafka.
45.3. Test Spring Kafka
60.1. Spring boot with Email (pom.xml)
66.1. Spring boot with Velocity template (pom.xml)
70.1. MyBatis
74.1. Spring Data Redis Example
75.1. Spring Data MongoDB - springframework-servlet.xml
91.1. Share feign interface.
104.1. memcached.java
114.1.