Skip to content

huruiyi/spring-boot-samples

Repository files navigation

Apache HttpClient

  1. Quick Start - contains simple, complete examples of request execution with the classic, fluent and async APIs.
  2. Examples demonstrating some common as well as more complex use cases
  3. Javadocs
  4. API compatibility reports

Apache HttpAsyncClient

  1. Quick Start - contains a simple, complete example of asynchronous request execution.
  2. HttpAsyncClient Examples - a set of examples demonstrating some of the more complex use scenarios.
  3. Javadocs

Apache httpcomponents svn

httpcomponents svn

BasicAsyncRequestProducer,HttpAsyncRequestConsumer

TreeSet特点

TreeSet是用来排序的, 可以指定一个顺序, 对象存入之后会按照指定的顺序排列 使用方式

自然顺序(Comparable)

TreeSet类的add()方法中会把存入的对象提升为Comparable类型 调用对象的compareTo()方法和集合中的对象比较 根据compareTo()方法返回的结果进行存储

比较器顺序(Comparator)

创建TreeSet的时候可以制定 一个Comparator 如果传入了Comparator的子类对象, 那么TreeSet就会按照比较器中的顺序排序 add()方法内部会自动调用Comparator接口中compare()方法排序 调用的对象是compare方法的第一个参数,集合中的对象是compare方法的第二个参数

两种方式的区别

TreeSet构造函数什么都不传, 默认按照类中Comparable的顺序(没有就报错ClassCastException) TreeSet如果传入Comparator, 就优先按照Comparator

show character set 
show variables like '%character%'
set character_set_server = utf8mb4
MySQL Character Set Name Java-Style Character Encoding Name
For 8.0.12 and earlier: utf8 UTF-8
For 8.0.13 and later: utf8mb4 UTF-8
gb2312 EUC_CN
gbk GBK
ascii US-ASCII

spring-boot-thin

<dependency>
    <groupId>org.springframework.boot.experimental</groupId>
    <artifactId>spring-boot-thin-layout</artifactId>
</dependency>

spring-boot-redis

redis的应用,以及缓存的使用

CSDN博主

howtodoinjava