dunwu/java-tutorial
repository·master·Indexed 23 days ago
https://github.com/dunwu/java-tutorialA comprehensive Java tutorial repository covering JavaSE, JavaEE, frameworks, middleware, and big data. It includes implementation solutions for distributed system algorithms, JavaEE example code, and detailed guides on RocketMQ (batching, broadcasting, FIFO, and scheduled messages), Easy Rules, and Maven. The documentation also provides tutorials on JavaWeb core technologies (Servlet, JSP, Filter, Listener), server management with Tomcat and Jetty, and monitoring with Zipkin.
What's inside java-tutorial
- The Spring Core section covers essential technologies for the Spring and Spring Boot frameworks. Key concepts include Spring Bean management, Inversion of Control (IoC), Dependency Injection (DI), Aspect-Oriented Programming (AOP), data binding, resource management, and Spring Boot quickstart/configuration. This module is designed to provide a deep understanding of how the Spring container manages object lifecycles and dependencies.
Overview of Java Monitoring and Diagnostic Tools
masterThis section provides a curated guide to various tools used for monitoring and diagnosing Java applications. The topics cover tool comparisons and specific deep-dives into industry-standard solutions for distributed tracing, performance monitoring, and real-time diagnostics.
Key tools covered include:
- CAT: A performance monitoring system.
- Zipkin: A distributed tracing system.
- SkyWalking: An APM (Application Performance Management) system.
- Arthas: A diagnostic tool for real-time inspection of running Java processes.
What is the Spring Framework?
masterSpring Framework is a lightweight, enterprise-grade Java application development framework. It provides a one-stop solution for building enterprise applications by promoting good programming practices through a POJO (Plain Old Java Object) programming model.
Key design philosophies include:
- Providing widespread choices
- Embracing flexibility
- Maintaining backward compatibility
- Focusing on API design
- Pursuing rigorous code quality
Overview of Spring Web topics
masterThe Spring Web section focuses on the application of the Spring framework within the web domain. Key areas covered include:
- Spring WebMvc: Implementation of the Model-View-Controller pattern.
- SpringBoot with EasyUI: Practical application of Spring Boot using the EasyUI framework.
Overview of Java Build Tools
masterJava projects utilize build tools to manage project dependencies and automate tasks such as compilation, packaging, publishing, and JavaDoc generation.
Common tools include:
- Maven: The most mainstream and powerful build tool currently in use.
- Gradle: A modern alternative known for concise version management, though it has a higher learning curve due to its requirement for Groovy.
- Ant: A legacy tool with fewer features than Maven or Gradle; while mostly replaced in modern projects, it is still found in traditional Java environments.
Overview of JavaEE example code
masterThis repository contains example code for JavaEE (Java Enterprise Edition) technologies. It serves as a reference for developers looking to implement enterprise-level Java applications.Overview of Java Caching Topics
masterThis section of the tutorial provides a structured learning path for Java caching, covering middleware frameworks, local process caches, and HTTP caching.
Key learning areas include:
- Java Caching Middleware: Frameworks used for distributed or managed caching.
- Ehcache Quickstart: Getting started with the Ehcache library.
- Java Process-Local Caching: Using libraries for in-memory caching within a single JVM process.
- HTTP Caching: Understanding how caching works at the protocol level.
Before diving into specific tools, it is recommended to understand Distributed Caching Principles to grasp cache characteristics, underlying mechanics, and common troubleshooting patterns.
Overview of Java Distributed System Implementations
masterThis project provides Java-based implementation solutions for common algorithms used in distributed systems. It serves as a reference for developers looking to understand or implement distributed logic using the Java language.Overview of JavaTutorial content
masterJavaTutorial is a comprehensive collection of Java learning resources covering a decade of expertise. The repository is organized into several key technical domains:
- JavaSE: Core Java technologies including basics, advanced features, concurrency, JVM, and IO.
- JavaEE: Web development (Servlet, JSP, Filter, Listener, Cookie/Session) and Servers (Tomcat, Jetty, Nginx).
- Java Software: Build tools (Maven, Ant), IDEs (IntelliJ IDEA, Eclipse, VS Code), and Monitoring/Diagnosis tools (CAT, Zipkin, SkyWalking, Arthas).
- Java Tools: IO (JSON/Binary serialization), JavaBean tools (Lombok, Dozer), Template Engines (Freemark, Velocity, Thymeleaf), and Testing tools (JUnit, Mockito, Jmeter, JMH).
- Java Frameworks: ORM (Mybatis), Spring ecosystem (Spring, Spring Boot), Security (Shiro, SpringSecurity), IO (Netty), and Microservices (Dubbo).
- Java Middleware: Message Queues (RocketMQ, ActiveMQ), Caching (Memcached, Ehcache, In-process cache), and Traffic Control (Hystrix).
- Big Data: Distributed systems and processing including HDFS, HBase, Hive, MapReduce, Yarn, ZooKeeper, Kafka, Spark, Storm, and Flink.
Overview of Spring Boot Core Features
masterSpring Boot is designed to rapidly launch Spring applications by implementing the 'convention over configuration' philosophy. It is essentially a Spring-based application that simplifies the development of the Spring ecosystem.
The four core features of Spring Boot are:
- Auto-configuration: Automatically configures Spring applications based on the dependencies present in the classpath.
- Starter Dependencies: Provides curated sets of dependency descriptors to simplify build configurations.
- Actuator: Provides production-ready features such as monitoring and management of your application.
- Command Line Interface (CLI): An optional feature that provides a powerful but non-standard development model.
To understand Spring Boot's core principles (specifically its startup process and auto-configuration), one must have a strong grasp of the underlying Spring Framework concepts: IoC Containers, JavaConfig, Event Listening, and
SpringFactoriesLoader.Overview of Java Software Ecosystem
masterThis section covers the essential software used in the Java development lifecycle, categorized into Build Tools, IDEs, and Monitoring/Diagnostic tools.
Build Tools
Used to manage project dependencies, compilation, packaging, publishing, and JavaDoc generation.
- Maven: The most mainstream and powerful tool. Recommended for most projects.
- Gradle: Offers concise version management but requires learning Groovy, which increases the learning curve.
- Ant: A legacy tool with less functionality than Maven or Gradle; primarily used in older projects.
IDEs (Integrated Development Environments)
Tools for writing and managing code.
- IntelliJ IDEA: Widely considered the best modern Java IDE.
- Eclipse: A long-standing, reputable open-source Java IDE.
- VS Code: A versatile editor that supports multiple languages via plugins, ideal for polyglot projects.
Monitoring and Diagnostics
Tools used for DevOps and application maintenance to collect, analyze, and visualize data to locate performance bottlenecks and issues.
- CAT, Zipkin, SkyWalking: Distributed tracing and monitoring systems.
- Arthas: A diagnostic tool for troubleshooting Java applications.
Overview of Java ORM Frameworks with MyBatis
masterThis section of the tutorial focuses on Java Object-Relational Mapping (ORM) frameworks, specifically highlighting MyBatis (formerly iBatis). MyBatis is a persistence framework that supports custom SQL, stored procedures, and advanced mapping. The tutorial provides resources for both quick starts and deep dives into the underlying source code and core mechanisms of MyBatis.