Introduction: Programming a hard work, a harvest, hope everyone treats with a branch of gratitude 【2365217564】
Weiyun learning address: https://share.weiyun.com/5mokPqU
Network disk learning address: https://pan.baidu.com/s/1CTx5SqUeM-ZKtDYLeovODQ extraction code: iclq
01
Object-oriented
→ What is object-oriented
Object-oriented, process-oriented
Three basic characteristics and five basic principles of object-oriented
→ Platform independence
Platform-independent how Java is implemented
What languages does the JVM support (Kotlin, Groovy, JRuby, Jython, Scala)
→ Value transfer
Value passing, reference passing
Why is there only value passing in Java
→ Encapsulation, inheritance, polymorphism
What is polymorphism, method rewriting and overloading
Java inheritance and implementation
Constructor and default constructor
Class variables, member variables and local variables
Member variables and method scope
02 Java basics
→ Basic data types
8 basic data types: integer, floating point, Boolean, character
Value range of byte, short, int, long in integer
What is floating point? What are single precision and double precision? Why can't the amount be expressed in floating point?
→ Automatic disassembly and assembly
What is the packaging type, what is the basic type, what is the automatic unpacking
Integer's caching mechanism
→ String
Immutability of strings
The principle and difference of substring in JDK 6 and JDK 7,
replaceFirst、replaceAll、replace 区别、
String Overload of "+", several ways and differences of string concatenation
The difference between String.valueOf and Integer.toString,
switch support for String
String pool, constant pool (runtime constant pool, Class constant pool), intern
→ Familiar with various keywords in Java
The principle and usage of transient, instanceof, final, static, volatile, synchronized, const
→ Collection class
The use of common collection classes, the difference between ArrayList and LinkedList and Vector, the difference between SynchronizedList and Vector, the difference between HashMap, HashTable, ConcurrentHashMap,
What is the difference between Set and List? How does Set ensure that elements are not duplicated?
Related usage of stream in Java 8, use of apache collection processing tool class, difference and implementation of HashMap in different versions of JDK
The difference between Collection and Collections
What should I pay attention to when using the List obtained by Arrays.asList
The difference between Enumeration and Iterator
fail-fast 和 fail-safe
CopyOnWriteArrayList 、 ConcurrentSkipListMap
→ Enumeration
Enum usage, enum implementation, enum and singleton, Enum class
How to compare Java enumeration
switch support for enumeration
How to implement serialization of enumeration
Enumerated thread safety issues
→ I
Character stream, byte stream, input stream, output stream,
5 IO models of synchronous, asynchronous, blocking, non-blocking, Linux
The difference between BIO, NIO and AIO, the usage and principle of the three IO, netty
→ reflection
What is the use of reflection and factory mode, reflection
Class 类、java.lang.reflect.*
→ Dynamic proxy
Static proxy, dynamic proxy
The relationship between dynamic agents and reflection
Several ways to realize dynamic proxy
AOP
→ serialization
What is serialization and deserialization, why serialization, the underlying principles of serialization, serialization and singleton mode, protobuf, why serialization is not safe
→ Annotation
Meta annotations, custom annotations, the use of common annotations in Java, the combination of annotations and reflection
Spring common notes
→ JMS
What is the Java Message Service, JMS messaging model
→ JMX
java.lang.management.*、 javax.management.*
→ Generic
Generics and inheritance, type erasure, meaning of KTVE? Object in generics, various usages
Qualified wildcards and unqualified wildcards, upper and lower qualifiers extends and super
The difference between List <Object> and the original type List?
What is the difference between List <?> And List <Object>?
→ Unit testing
junit, mock, mockito, in-memory database (h2)
→ Regular expression
java.lang.util.regex. *
→ Commonly used Java tool library
commons.lang、commons.*...、 guava-libraries、 netty
→ API & SPI
The relationship and difference of API, API and SPI
How to define the implementation principle of SPI and SPI
→ Abnormal
Exception types, correct handling of exceptions, custom exceptions
Error 和 Exception
Exception chain, try-with-resources
The execution order of finally and return
→ Time processing
Time zone, winter and summer time, timestamp, time API in Java
Greenwich Mean Time, CET, UTC, GMT, CST
SimpleDateFormat thread safety issues
Time processing in Java 8
How to get U.S. time on a computer in the East Eighth District
→ Encoding method
Unicode, why do you need UTF-8 with Unicode
The difference between GBK, GB2312, GB18030
UTF8, UTF16, UTF32 difference
URL codec, Big Endian and Little Endian
How to solve the garbled problem
→ Syntactic sugar
Principles of syntactic sugar in Java, syntactic sugar solution
Syntactic sugar: switch supports String and enumeration, generics, automatic boxing and unboxing, method variable length parameters, enumeration, inner classes, conditional compilation, assertions, numeric literals, for-each, try-with-resource, Lambda expression
03 Read the source code
String、Integer、Long、Enum、
BigDecimal、ThreadLocal、ClassLoader & URLClassLoader、
ArrayList & LinkedList、
HashMap & LinkedHashMap & TreeMap & CouncurrentHashMap、HashSet & LinkedHashSet & TreeSet
04 Java concurrent programming
→ Concurrency and parallelism
What is concurrency and what is parallel
The difference between concurrency and parallelism
→ What is a thread and the difference from a process
Thread implementation, thread status, priority, thread scheduling, multiple ways to create threads, daemon threads
The difference between threads and processes
→ thread pool
Design your own thread pool, submit () and execute (), thread pool principle
Why it is not allowed to use Executors to create a thread pool
→ Thread safety
The relationship between deadlock, how to troubleshoot, thread safety and memory model
→ lock
CAS, optimistic and pessimistic locks, database-related lock mechanisms, distributed locks, biased locks, lightweight locks, heavyweight locks, monitor,
Lock optimization, lock elimination, lock coarsening, spin lock, reentrant lock, blocking lock, deadlock
→ deadlock
What is a deadlock
How to solve the deadlock
→ synchronized
How is synchronized implemented?
The relationship between synchronized and lock, how to achieve a thread-safe singleton without using synchronized
The relationship between synchronized and atomicity, visibility and order
→ volatile
happens-before, memory barrier, compiler instruction rearrangement, and CPU instruction reordering
Implementation principle of volatile
The relationship between volatile and atomicity, visibility and order
With synchronized, why do you need volatile
→ sleep 和 wait
→ wait 和 notify
→ notify 和 notifyAll
→ ThreadLocal
→ Write a deadlock program
→ Write code to solve producer and consumer problems
→ Parallel package
Thread、Runnable、Callable、ReentrantLock、ReentrantReadWriteLock、Atomic*、Semaphore、CountDownLatch、ConcurrentHashMap、Executors
2
The bottom story
01JVM
→ JVM memory structure
class file format, runtime data area: heap, stack, method area, direct memory, runtime constant pool,
Heap and stack difference
Must objects in Java be allocated on the heap?
→ Java memory model
Computer memory model, cache coherence, MESI protocol
Visibility, atomicity, sequentiality, happens-before,
Memory barrier, synchronized, volatile, final, lock
→ garbage collection
GC algorithm: mark removal, reference counting, copying, mark compression, generational recovery, incremental recovery
GC parameters, determination of object survival, garbage collector (CMS, G1, ZGC, Epsilon)
→ JVM parameters and tuning
-Xmx、-Xmn、-Xms、Xss、-XX:SurvivorRatio、
-XX:PermSize、-XX:MaxPermSize、-XX:MaxTenuringThreshold
→ Java Object Model
oop-klass, object header
→ HotSpot
Just-in-time compiler, compilation optimization
→ Virtual machine performance monitoring and troubleshooting tools
jps, jstack, jmap, jstat, jconsole, jinfo, jhat, javap, btrace, TProfiler
Arthas
02 class loading mechanism
classLoader, class loading process, parent delegation (destroy parent delegation), modularity (jboss modules, osgi, jigsaw)
03 Compile and decompile
What is compilation (front-end compilation, back-end compilation), what is decompilation
JIT, JIT optimization (escape analysis, stack allocation, scalar replacement, lock optimization)
Compilation tool: javac
Decompilation tools: javap, jad, CRF
3
Advanced
01 Java basic knowledge
→ Bytecode, class file format
→ CPU cache, L1, L2, L3 and pseudo sharing
→ Tail recursion
→ Bit operation
Use bit operations to add, subtract, multiply, divide, and take the remainder
02 Design mode
Six principles of design patterns:
Open Close Principle, Liskov Substitution Principle, Dependence Inversion Principle
Interface Segregation Principle, Demeter Principle, Composite Reuse Principle
→ Understand 23 design patterns
Creation mode: singleton mode, abstract factory mode, builder mode, factory mode, prototype mode.
Structural mode: adapter mode, bridge mode, decoration mode, combination mode, appearance mode, flyweight mode, proxy mode.
Behavior mode: template method mode, command mode, iterator mode, observer mode, intermediary mode, memo mode, interpreter mode (Interpreter mode), state mode, strategy mode, chain of responsibility mode (chain of responsibility mode), access者 模型。 The mode.
→ Will use common design patterns
Seven ways to write a single case: lazy-thread unsafe, lazy-thread safe, hungry, hungry-variant, static internal class, enumeration, double check lock
Factory mode, adapter mode, strategy mode, template method mode, observer mode, appearance mode, proxy mode, etc.
→ Without synchronized and lock, achieve thread-safe singleton mode
→ Implement AOP
→ Implement IOC
→ nio and reactor design pattern
03 Network programming knowledge
→ tcp, udp, http, https and other common protocols
Three-way handshake and four-time shutdown, flow control and congestion control, OSI seven-layer model, tcp sticky and unpack
→ Differences before http / 1.0 http / 1.1 http / 2
The difference between get and post in http
Status codes returned by common web requests
What do 404, 302, 301, and 500 represent?
→ http/3
→ Java RMI,Socket,HttpClient
→ cookie 与 session
Cookie is disabled, how to implement session
→ Write a simple static file HTTP server in Java
→ Understand the characteristics of nginx and apache servers and build a corresponding server
→ Implementing FTP and SMTP protocols in Java
→ Ways of communication between processes
→ What is a CDN? If it is achieved?
→ DNS
What is DNS, record type: A record, CNAME record, AAAA record, etc.
Domain name resolution, root domain name server
DNS pollution, DNS hijacking, public DNS: 114 DNS, Google DNS, OpenDNS
→ Reverse proxy
Forward proxy, reverse proxy
Reverse proxy server
04 Framework Knowledge
→ Servlet
The life cycle
Thread safety issues
filter 和 listener
Common configuration and function in web.xml
→ Hibernate
What is OR Mapping
Lazy loading of Hibernate
Hibernate's caching mechanism
Difference between Hibernate / Ibatis / MyBatis
→ Spring
Bean initialization
AOP principle
Implementing Spring's IOC
Four types of dependency injection in Spring
→ Spring MVC
What is MVC
The difference between Spring mvc and Struts mvc
→ Spring Boot
Spring Boot 2.0, starting dependencies, auto configuration,
Spring Boot's starter principle, implement a starter yourself
→ Spring Security
→ Spring Cloud
Service discovery and registration: Eureka, Zookeeper, Consul
Load balancing: Feign, Spring Cloud Loadbalance
Service configuration: Spring Cloud Config
Service current limiting and fusing: Hystrix
Service link tracking: Dapper
Service gateway, security, messaging
05 Application server knowledge
→ JBoss
→ tomcat
→ jetty
→ Weblogic
06 Tools
→ git & svn
→ maven & gradle
→ Intellij IDEA
Common plug-ins: Maven Helper, FindBugs-IDEA, Alibaba code protocol detection, GsonFormat
Lombok plugin、.ignore、Mybatis plugin
4
Advanced
01 New technology
→ Java 8
lambda expression, Stream API, time API
→ Java 9
Jigsaw、Jshell、Reactive Streams
→ Java 10
Local variable type inference, G1's parallel Full GC, ThreadLocal handshake mechanism
→ Java 11
ZGC, Epsilon, enhanced var
→ Spring 5
Responsive programming
→ Spring Boot 2.0
→ HTTP/2
→ HTTP/3
02 Performance optimization
Use singleton, use Future mode, use thread pool
Select ready, reduce context switching, reduce lock granularity, data compression, result caching
03 Online problem analysis
→ dump to get
Thread Dump, memory Dump, gc situation
→ dump analysis
Analyze deadlocks, analyze memory leaks
→ dump analysis and acquisition tool
jstack 、 jstat 、 jmap 、 jhat 、 Arthas
→ Write various outofmemory and stackoverflow programs by yourself
HeapOutOfMemory、 Young OutOfMemory、
MethodArea OutOfMemory、ConstantPool OutOfMemory、
DirectMemory OutOfMemory、Stack OutOfMemory Stack OverFlow
→ Arthas
jvm related, class / classloader related, monitor / watch / trace related,
options, pipelines, background asynchronous tasks
Documentation: https://alibaba.github.io/arthas/advanced-use.html
→ Common problem solving ideas
Memory overflow, thread deadlock, class loading conflict
→ Use tools to try to solve the following problems and write a summary
How to find problems when a Java program responds slowly
How to solve the problem when a Java program frequently FullGC
How to view the garbage collection log
What to do when OutOfMemory occurs in a Java application
How to determine whether a deadlock occurs
How to determine if there is a memory leak
Use Arthas to quickly troubleshoot Spring Boot application 404/401 problems
Use Arthas to troubleshoot online application logs
Use Arthas to troubleshoot Spring Boot application NoSuchMethodError
04 Compiling principle knowledge
→ Compile and decompile
→ Compile and decompile Java code
→ Java decompilation tool
javap 、jad 、CRF
→ Just-in-time compiler
→ compilation process
Lexical analysis, grammatical analysis (LL algorithm, recursive descent algorithm, LR algorithm)
Semantic analysis, runtime environment, intermediate code, code generation, code optimization
05 Operating system knowledge
→ Common commands for Linux
→ Interprocess communication
→ Process synchronization
Producer consumer issues, philosopher dining issues, reader writer issues
→ Buffer overflow
→ Segmentation and paging
→ Virtual memory and main memory
→ Virtual memory management
→ Page change algorithm
06 Database knowledge
→ MySQL execution engine
→ MySQL execution plan
How to view the execution plan, how to optimize SQL according to the execution plan
→ Index
Hash index, B tree index (B + tree, and B tree, R tree)
Common index, unique index
Coverage index, leftmost prefix principle, index pushdown
→ SQL optimization
→ Database transaction and isolation level
The isolation level of the transaction and whether the transaction can achieve the function of lock
→ Database lock
Row locks, table locks, optimistic locking using database locks,
→ Connect
Internal connection, left connection, right connection
→ Database master and backup setup
→ binlog
→ redolog
→ Memory database
h2
→ Sub-library and sub-table
→ Separation of reading and writing
→ Commonly used NoSql database
redis、memcached
→ Use database lock and NoSql to implement distributed lock
→ Performance tuning
→ Database connection pool
07 Data structure and algorithm knowledge
→ Simple data structure
Stack, queue, linked list, array, hash table,
Similarities and differences between stack and queue
Two storage structures commonly used by the stack
→ tree
Binary tree, dictionary tree, balanced tree, sorting tree,
B tree, B + tree, R tree, multi-way tree, red black tree
→ heap
Big root heap, small root heap
→ Figure
Directed graph, undirected graph, topology
→ Sorting algorithm
Stable sort: bubble sort, insert sort, cocktail sort, bucket sort, count sort, merge sort, in-place merge sort, binary sort tree sort, pigeon nest sort, cardinal sort, dwarf sort, library sort, block sort
Unstable sorting: selection sorting, Hill sorting, Clover sorting algorithm, comb sorting, heap sorting, smooth sorting, quick sorting, introspective sorting, patient sorting
Various sorting algorithms and time complexity
→ Two stacks implement queues, and two queues implement stacks
→ Depth-first and breadth-first search
→ Full permutation, greedy algorithm, KMP algorithm, hash algorithm
→ Massive data processing
Divide and conquer, hash mapping, heap sorting, double bucket division, Bloom Filter, bitmap, database index, mapreduce, etc.
08 Big Data Knowledge
→ Zookeeper
Basic concepts and common usage
→ Solr,Lucene,ElasticSearch
Deploy solr and solrcloud on Linux, add, delete, and query indexes
→ Storm, streaming computing, understanding Spark, S4
Deploy storm on linux, use zookeeper for coordination, run storm hello world, local and remote mode to run and debug storm topology.
→ Hadoop, offline computing
HDFS、MapReduce
→ Distributed log collection flume, kafka, logstash
→ Data mining, mahout
09 Network Security Knowledge
→ XSS
XSS defense
→ CSRF
→ Injection attack
SQL injection, XML injection, CRLF injection
→ File upload vulnerability
→ Encryption and decryption
Symmetric encryption, asymmetric encryption, hash algorithm, salted hash algorithm
MD5 , SHA1 、 DES 、 AES 、 RSA 、 DSA
Rainbow table
→ DDOS attack
DOS attack, DDOS attack
Why can memcached cause DDos attacks and what is reflective DDoS
How to perform DOS attack through Hash collision
→ SSL、TLS,HTTPS
→ Sign a certificate with openssl to deploy to apache or nginx
5
Architecture articles
01 Distributed
Data consistency, service governance, service degradation
→ Distributed transaction
2PC, 3PC, CAP, BASE, eventual consistency of reliable messages, best effort notification, TCC
→ Dubbo
Service registration, service discovery, service governance
http://dubbo.apache.org/zh-cn/
→ Distributed database
How to build a distributed database, when do you need a distributed database,
mycat、otter、HBase
→ Distributed file system
mfs 、 fastdfs
→ Distributed cache
Cache consistency, cache hit rate, cache redundancy
→ Current limit demotion
Hystrix、Sentinal
→ Algorithm
Consensus algorithm, Raft protocol, Paxos algorithm and Raft algorithm,
Byzantine problems and algorithms, 2PC, 3PC
02 Microservices
SOA, Conway's Law
→ ServiceMesh
sidecar
→ Docker & Kubernets
→ Spring Boot
→ Spring Cloud
03 High concurrency
→ Sub-library and sub-table
→ CDN technology
→ Message queue
ActiveMQ
04
monitor
→ What to monitor
CPU, memory, disk I / O, network I / O, etc.
→ Monitoring means
Process monitoring, semantic monitoring, machine resource monitoring, data fluctuation
→ Monitoring data collection
Log, buried point
→ Dapper
05 Load balancing
tomcat load balancing, Nginx load balancing
Layer 4 load balancing, layer 7 load balancing
06 DNS
DNS principle, DNS design
07 CDN
Data consistency
6
Extension
01 Cloud Computing
IaaS, SaaS, PaaS, virtualization technology, openstack, Serverlsess
02 Search Engine
Solr、Lucene、Nutch、Elasticsearch
03 Rights Management
Shiro
04 Blockchain
Hash algorithm, Merkle tree, public key cryptographic algorithm, consensus algorithm,
Raft protocol, Paxos algorithm and Raft algorithm, Byzantine problem and algorithm, message authentication code and digital signature
→ Bitcoin
Mining, consensus mechanism, lightning network, side chain, hot issues, fork
→ Ethereum
→ Super Ledger
05 Artificial Intelligence
Mathematics foundation, machine learning, artificial neural network, deep learning, application scenarios.
→ Common frame
TensorFlow、DeepLearning4J
06 loT
07 Quantum Computing
08 AR & VR
09 Other languages
Groovy、Python、Go、NodeJs、Swift、Rust