$ show zq2599/blog_demos
This is a large, sprawling collection of tutorial and demo projects authored by a single developer (blogger '็จๅบๅๆฌฃๅฎธ'). It covers dozens of technologies including Spring Boot internals, Flink, Kafka, gRPC, JavaCV/OpenCV, Kubernetes controllers, LangChain4j, JUnit 5, and more. Each subdirectory is an independent, self-contained demo typically with a single main class or test. The code is educational: full of Chinese comments, simplified logic, and hardcoded paths. While not a cohesive application, it serves as a rich reference for learning how to use specific frameworks and patterns. The quality is average overallโfunctional but boilerplate-heavy, with many outdated dependencies and duplicated code across projects.
The LLM identified 4 files worth highlighting for reuse:
Defines a `DetectService` interface with a single `detect` method, allowing different detection algorithms (Haar cascade, HOG, Baidu cloud, CamShift) to be swapped. Includes static helper methods for OpenCV frame conversion. This is a clean strategy pattern that could be extracted and reused for any image/video processing pipeline.
Abstract base class for Flink CoProcessFunction demos that encapsulates common setup (environment, key selector, custom operator) and invokes an abstract `run()` method. Demonstrates a reusable template for testing CoProcessFunction logic, easily adaptable to different stream-join scenarios.
Implements a custom Kubernetes controller using the informer/workqueue pattern: watches a custom CRD, enqueues keys, and processes them with rate limiting and retry logic. The `NewController`, `Run`, and `syncHandler` are standard K8s controller patterns that can be extracted as a boilerplate for any custom operator.
A comprehensive JUnit 5 parameterized test class demonstrating `@ValueSource`, `@EnumSource`, `@MethodSource`, `@CsvSource`, `@CsvFileSource`, `@ArgumentsSource`, custom argument converters, and aggregators. Serves as a reusable reference for writing parameterized tests in any Java project.