Shepherd Advanced Notes
Author

Shepherd Advanced Notes

Dedicated to sharing advanced Java technical insights, daily work snippets, and the power of persistent effort.

127
Articles
0
Likes
403
Views
0
Comments
Recent Articles

Latest from Shepherd Advanced Notes

100 recent articles max
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 31, 2024 · Backend Development

How to Run Custom Code at Spring Boot Startup: 8 Implementation Options

This article explains eight ways to execute custom initialization logic during Spring Boot startup, covering CommandLineRunner, ApplicationRunner, ApplicationListener, @EventListener, @PostConstruct, BeanPostProcessor, InitializingBean, SmartInitializingSingleton, and the main method, with code examples and suitable use‑case guidance.

BeanPostProcessorCommandLineRunnerPostConstruct
0 likes · 10 min read
How to Run Custom Code at Spring Boot Startup: 8 Implementation Options
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 24, 2024 · Backend Development

What Exactly Happens During Spring Boot Startup? A Deep Dive

This article walks through the Spring Boot startup sequence, detailing how the @SpringBootApplication entry point creates a SpringApplication instance, prepares the environment, builds and refreshes the IoC container, runs ApplicationRunner/CommandLineRunner callbacks, and finally publishes the ApplicationReadyEvent.

ApplicationContextConfigurationIOC Container
0 likes · 10 min read
What Exactly Happens During Spring Boot Startup? A Deep Dive
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 10, 2024 · Backend Development

Master ApplicationRunner and CommandLineRunner: Usage and Implementation in Spring Boot

This article explains the purpose of Spring Boot's ApplicationRunner and CommandLineRunner interfaces, demonstrates common startup tasks such as data initialization, configuration loading, cache population and license verification, compares their parameter handling, shows how to control execution order with @Order, and reveals the internal call chain that Spring uses to invoke these runners.

ApplicationRunnerCommandLineRunnerInitialization
0 likes · 15 min read
Master ApplicationRunner and CommandLineRunner: Usage and Implementation in Spring Boot
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 30, 2024 · Backend Development

Deep Dive into Xxl-Job Core Architecture: How It Works and Why

This article explains Xxl-Job’s lightweight distributed scheduling architecture, covering the admin console, executor startup, JobHandler initialization, HTTP server registration, task triggering logic with scheduling threads, fast/slow thread pools, routing and blocking strategies, and result callbacks, illustrated with code snippets and diagrams.

JavaSpring BootXXL-JOB
0 likes · 21 min read
Deep Dive into Xxl-Job Core Architecture: How It Works and Why
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 24, 2024 · Backend Development

How to Properly Configure ThreadPoolExecutor Parameters in Java

This article explains the background, creation, and detailed parameters of Java's ThreadPoolExecutor, walks through its task execution flow, warns against using Executors factory methods, and provides practical formulas for setting core pool sizes based on CPU‑bound or I/O‑bound workloads.

CPUConcurrencyExecutorService
0 likes · 15 min read
How to Properly Configure ThreadPoolExecutor Parameters in Java
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 20, 2024 · Backend Development

Why You Should Stop Reinventing Utility Classes and Use Hutool (or Guava) Instead

The article introduces the open‑source Java utility library Hutool, compares it with Guava, lists its modules, shows how to install it via Maven, and provides concrete code examples for HTTP requests, random codes, date handling, string manipulation, number operations, map utilities, encryption, captcha generation, and data desensitization, demonstrating how it can reduce boiler‑plate and speed up development.

Code ExamplesDateUtilHTTP
0 likes · 11 min read
Why You Should Stop Reinventing Utility Classes and Use Hutool (or Guava) Instead
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 10, 2024 · Fundamentals

Deep Dive into Guava: A Powerful Toolkit for Java Developers

This article provides a comprehensive guide to Google Guava, covering its core modules such as collections, concurrency, string utilities, I/O, caching, event bus, functional programming, reflection, and best‑practice code examples that demonstrate how to simplify and strengthen Java development.

ConcurrencyEventBusGuava
0 likes · 31 min read
Deep Dive into Guava: A Powerful Toolkit for Java Developers
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 6, 2024 · Fundamentals

Long vs BigDecimal for Monetary Values: Which Is Safer?

The article examines the long‑standing debate over using Long or BigDecimal to represent monetary amounts, presents ten community‑sourced approaches with visual illustrations, analyzes the underlying precision problem, and concludes with a recommendation favoring BigDecimal for accurate financial calculations.

BigDecimalData TypesFinancial Computing
0 likes · 9 min read
Long vs BigDecimal for Monetary Values: Which Is Safer?