Shepherd Advanced Notes
Author

Shepherd Advanced Notes

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

122
Articles
0
Likes
0
Views
0
Comments
Recent Articles

Latest from Shepherd Advanced Notes

100 recent articles max
Shepherd Advanced Notes
Shepherd Advanced Notes
Jul 9, 2025 · Databases

Comprehensive Guide to Fastest Batch Update Techniques in MyBatis

This article systematically compares six MyBatis batch‑update approaches—including simple for‑loop, foreach XML, CASE WHEN, ON DUPLICATE KEY UPDATE, REPLACE INTO, and MyBatis‑Plus—by presenting concrete code, execution‑time measurements on 10 000 rows, and analysis of I/O, SQL parsing, scalability, and database compatibility, ultimately recommending the most performant and maintainable method for different scenarios.

Batch UpdateCASE WHENMyBatis
0 likes · 13 min read
Comprehensive Guide to Fastest Batch Update Techniques in MyBatis
Shepherd Advanced Notes
Shepherd Advanced Notes
Jul 2, 2025 · Fundamentals

45 Tips for Writing Clean, Beautiful Code

This article presents 45 practical coding tips—from naming conventions and formatting to exception handling, thread safety, and design patterns—illustrated with Java examples and real‑world scenarios, helping developers produce readable, maintainable, and robust code.

Design Patternsbest practicesclean code
0 likes · 29 min read
45 Tips for Writing Clean, Beautiful Code
Shepherd Advanced Notes
Shepherd Advanced Notes
May 15, 2025 · Backend Development

Deep Dive into Spring Boot Parameter Validation: Implementation, Custom Annotations, and Internationalization

This article explains how Spring Boot leverages JSR‑380 for declarative request validation, walks through the internal processing chain from RequestResponseBodyMethodProcessor to Hibernate Validator, and demonstrates building custom annotations for enum checks and conditional field validation while supporting multilingual error messages.

Hibernate ValidatorInternationalizationJSR-380
0 likes · 11 min read
Deep Dive into Spring Boot Parameter Validation: Implementation, Custom Annotations, and Internationalization
Shepherd Advanced Notes
Shepherd Advanced Notes
May 8, 2025 · Backend Development

Missing Parameter Validation Can Crash a Spring Boot Service – A Complete Guide

A real‑world incident where an unchecked null request parameter caused a full‑table query, massive memory usage and OOM is examined, then Spring Boot’s validation framework—including manual checks, annotation‑driven constraints, nested and group validation, and global exception handling—is demonstrated step‑by‑step with code samples.

JavaSpring Bootbackend
0 likes · 18 min read
Missing Parameter Validation Can Crash a Spring Boot Service – A Complete Guide
Shepherd Advanced Notes
Shepherd Advanced Notes
Feb 20, 2025 · Backend Development

How Spring Boot Handles Cross-Origin Requests

This article explains the fundamentals of CORS, why browsers enforce the same‑origin policy, how Spring Boot detects and processes cross‑origin and preflight requests, and provides a minimal configuration and JavaScript example to resolve CORS issues in a Spring Boot application.

CORSConfigurationCross-Origin
0 likes · 11 min read
How Spring Boot Handles Cross-Origin Requests
Shepherd Advanced Notes
Shepherd Advanced Notes
Feb 5, 2025 · Databases

Elegant Techniques for Group‑Then‑Sort and Top‑Record Retrieval in MySQL & Elasticsearch

The article walks through a common database requirement—grouping rows, sorting within each group, and extracting the first (or top N) records—by preparing sample data, comparing MySQL window functions, subqueries, and JOIN solutions, adding index optimizations, and demonstrating equivalent Elasticsearch aggregations, all backed by concrete performance measurements.

ElasticsearchMySQLSQL
0 likes · 11 min read
Elegant Techniques for Group‑Then‑Sort and Top‑Record Retrieval in MySQL & Elasticsearch