java

序号 内容 链接地址
1 Java基础知识面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104390612

2 Java集合容器面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104588551

3 Java异常面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104390689

4 并发编程面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104863992

5 JVM面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104390752

6 Spring面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104397516

7 Spring MVC面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104397427

8 Spring Boot面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104397299

9 Spring Cloud面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104397367

10 MyBatis面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/101292950

11 Redis面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/103522351

12 MySQL数据库面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104778621

13 消息中间件MQ与RabbitMQ面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104588612

14 Dubbo面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104390006

15 Linux面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104588679

16 Tomcat面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104397665

17 ZooKeeper面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104397719

18 Netty面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/104391081

19 架构设计&分布式&数据结构与算法面试题(2020最新版) https://thinkwon.blog.csdn.net/article/details/105870730

java redis2

Redis 的数据类型有哪些

字符串(strings)、哈希(hashes)、列表(lists)、集合(sets)、有序集合(sorted sets)等,
除此之外还支持 bitmaps、hyperloglogs 和地理空间( geospatial )索引半径查询等功能。

阅读更多

java/spring 内存数据库

H2数据库

H2是一个由java实现的开源内存数据库,它可以支持内存模式和独立模式。 如果要使用H2数据库,需要添加如下依赖:

1
2
3
4
5
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.194</version>
</dependency>
阅读更多

apache.http.impl.client.HttpClients

1
2
3
4
5
6
7
8
try (CloseableHttpClient httpClient = HttpClients.custom().disableAutomaticRetries().build()) {
HttpPost httpPost = new HttpPost("http://www.baidu.com");

try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
int statusCode = response.getStatusLine().getStatusCode();
}
}

阅读更多

Jdk8 DNS解析

Java提供InetAddress类,可以对域名-IP进行正向、逆向解析。

InetAddress解析的时候一般是调用系统自带的DNS程序。

linux 默认的DNS方式是读取/etc/resolv.conf进行DNS解析。

mac 默认的方式是向网关请求获取DNS服务器,然后直接请求DNS服务器进行解析,没有读取/etc/resolv.conf。

DNSNameService 根据sun.net.spi.nameservice.nameservers指定的name server或/etc/resolv.conf文件中配置的name server进行DNS解析

阅读更多

ThreadPoolTaskExecutor

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.util.concurrent.ThreadPoolExecutor;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

@Configuration
@EnableAsync
public class ThreadPool {
public static final int DEFAULT_THREADS_NUMS = 2 * Runtime.getRuntime().availableProcessors();
@Bean("taskExecutor")
public ThreadPoolTaskExecutor taskExecutor() {
ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();

int maxPoolSize = 2 * DEFAULT_THREADS_NUMS;
threadPoolTaskExecutor.setCorePoolSize(DEFAULT_THREADS_NUMS);
threadPoolTaskExecutor.setMaxPoolSize(maxPoolSize);
threadPoolTaskExecutor.setQueueCapacity(maxPoolSize);
threadPoolTaskExecutor.setKeepAliveSeconds(60);
threadPoolTaskExecutor.setThreadNamePrefix("Async-Thread-");
threadPoolTaskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());

return threadPoolTaskExecutor;
}
}

参考文章