Java Captain
Author

Java Captain

Focused on Java technologies: SSM, the Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading; occasionally covers DevOps tools like Jenkins, Nexus, Docker, ELK; shares practical tech insights and is dedicated to full‑stack Java development.

1.2k
Articles
0
Likes
2.5k
Views
0
Comments
Recent Articles

Latest from Java Captain

100 recent articles max
Java Captain
Java Captain
May 23, 2025 · Backend Development

Resolving Spring Boot Resource Loading Errors When Running from a JAR

This article explains why a Spring Boot application fails to locate a template file when packaged as a JAR, details the step‑by‑step debugging process, and provides code solutions using ClassPathResource or PathMatchingResourcePatternResolver to correctly read resources inside the JAR.

JarJavaSpring Boot
0 likes · 5 min read
Resolving Spring Boot Resource Loading Errors When Running from a JAR
Java Captain
Java Captain
May 23, 2025 · Backend Development

CompressUtil Java Utility for File Compression and Download

This article introduces a Java utility class named CompressUtil that provides methods for compressing files and directories into ZIP archives, handling duplicate filenames, creating new files safely, and offering HTTP endpoints for downloading the generated ZIP files in a single request.

File CompressionServletUtility
0 likes · 10 min read
CompressUtil Java Utility for File Compression and Download
Java Captain
Java Captain
May 23, 2025 · Backend Development

Common Causes of Kafka Message Loss and Mitigation Strategies

This article examines the typical reasons Kafka messages are lost across producers, brokers, and consumers, and provides detailed configuration recommendations and best‑practice solutions to significantly reduce the risk of data loss in distributed streaming systems.

BrokerConfigurationConsumer
0 likes · 15 min read
Common Causes of Kafka Message Loss and Mitigation Strategies
Java Captain
Java Captain
May 21, 2025 · Fundamentals

Understanding Java Thread States and Their Transitions with Example Code

This article explains the six Java thread states defined in java.lang.Thread.State, describes the meaning of each state, illustrates the possible state transitions, and provides three runnable code examples that demonstrate NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING and TERMINATED states along with their console outputs.

JavaThreadStateconcurrency
0 likes · 11 min read
Understanding Java Thread States and Their Transitions with Example Code