Learning Spring Cloud

1. Service Decomposition and Remote Calls 1.1 Why decompose into services? As business grows, a monolith faces slow deployment, poor scalability, a frozen tech stack, and more. Microservices split it into small, independently deployable and scalable services, each responsible for a single business domain. Decomposition principles: Single responsibility: each service does one thing High cohesion, low coupling: tight within a service, loose between services Data independence: each service owns an independent database 1.2 The user-login flow (from a microservice view) Client → Gateway (auth) → business microservice A → microservice B (OpenFeign) ↓ Nacos (service discovery) 1.3 RestTemplate — the raw inter-service call RestTemplate is the HTTP client Spring provides for inter-service calls, but its code is verbose and it doesn’t support load balancing — a transitional solution before OpenFeign. ...

2024-03-18 12:46:51 PM · 20 min
Study Notes

Learning the SSM Framework

1. The Spring IoC Container 1.1 Container architecture BeanFactory (top-level interface) └── ApplicationContext (the commonly used interface, extends BF) ├── ClassPathXmlApplicationContext (XML config) ├── FileSystemXmlApplicationContext (filesystem-path XML) └── AnnotationConfigApplicationContext (annotation config) Core differences between BeanFactory and ApplicationContext: Feature BeanFactory ApplicationContext Bean init timing Lazy (on the first getBean) Eager (at container startup) Features Basic IoC IoC + event publishing + i18n + AOP, etc. Use case Extremely resource-constrained embedded 99% of business scenarios Why doesn’t ApplicationContext have close()? The ApplicationContext interface itself doesn’t define close(), to keep the interface general (not all containers can/need to be closed, e.g. web containers). But its implementation AbstractApplicationContext implements Closeable, so you can cast and call it, or receive it via the ConfigurableApplicationContext interface. ...

2024-02-18 12:40:44 PM · 19 min
Study Notes

Learning MyBatis-Plus

1. Introduction MyBatis-Plus (MP for short) is an enhancement tool for MyBatis. It only enhances MyBatis without changing it, built to simplify development and improve efficiency. Core features: Non-intrusive: adding MP has no effect on an existing MyBatis project — smooth as silk. Low overhead: basic CRUD is auto-injected at startup, with essentially no performance loss. Powerful CRUD operations: built-in generic Mapper and generic Service; with just a little configuration you get most single-table CRUD. Supports Lambda-style calls: write query conditions safely and efficiently via lambda expressions, preventing mistyped field names. Built-in code generator: generate Mapper, Service, Controller, etc. with minimal configuration. Built-in pagination plugin: physical pagination based on MyBatis; developers don’t need to worry about the details — just configure and use. Official site: https://baomidou.com/ ...

2024-01-16 03:38:37 PM · 12 min
Study Notes

Enrique Granados - Apparitions Romantic Waltzes Transcription

2021-09-05 08:23:55 AM · 0 min

Original Music : Piano Thief

https://img.wathan.cn/qzone_videos/%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%87%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B9%80%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B9%81%E0%B8%A1%E0%B9%88%E0%B8%84%E0%B8%B4%E0%B8%94%E0%B8%96%E0%B8%B6%E0%B8%87%E0%B9%81%E0%B8%A1%E0%B9%88%20_%20%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%87%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B9%80%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B9%81%E0%B8%A1%E0%B9%88%E5%86%99%E7%BB%99_video_0.mp4

2021-08-25 08:23:55 AM · 1 min
Original Music

A Letter for Mama (To Make Her Happy) (Arrangement)

2021-08-21 10:38:15 AM · 0 min

An Idea for a Zombie Survival Game UPDATING

When the world falls to ruin and human civilization collapses. No government, no law, no internet, no order. You and 99 other survivors are trapped in a wasteland spanning hundreds of square kilometers. Here there is food, guns, vehicles, medicine, shelter. Here there are also millions of ever-evolving zombies. And your goal is only one: Survive 100 days. Chapter One: The Apocalypse Arrives When the game begins, the 100 players spawn at random across different regions of a massive open map. ...

2021-08-18 12:34:11 PM · 7 min

Kono Sougen no Hikari wo - Himekami - Shinrabansho (1998) (Arrangement)

2021-07-30 05:38:15 PM · 0 min

Original Piano Fragment: Lang Ge Lang Er Lang

2021-07-30 05:38:15 PM · 0 min
Original Piano Piece

Original Piano Piece: Blown-Away Sheet Music

2021-07-30 05:38:15 PM · 0 min
Original Piano Piece