From 3be04dab3afabf63e43b4deb1376f793ad01e208 Mon Sep 17 00:00:00 2001 From: siujamo Date: Tue, 16 Jun 2026 15:36:12 +0800 Subject: [PATCH] docs(spring-boot): align examples with documented conventions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two consistency cleanups: - Drop redundant column aliases in the MyBatis Mapper example; map-underscore-to-camel-case is already enabled in application.yml, so the explicit aliases are noise. - Re-nest the request/response directories under a top-level domain/ package in the end-to-end example to match the project layout shown earlier in the skill. The transfer-objects section already refers to com.example.app.domain.request.* and com.example.app.domain.response.* implicitly via the layout tree. Also drops the now-orphaned 阿里巴巴《Java 开发手册》 line from Authoritative References, since the rest of the skill no longer leans on it for terminology. --- spring-boot/SKILL.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-boot/SKILL.md b/spring-boot/SKILL.md index be4663f..2dee2f0 100644 --- a/spring-boot/SKILL.md +++ b/spring-boot/SKILL.md @@ -507,14 +507,14 @@ A protected no-arg constructor is required by JPA. Static factories (`fromReques public interface UserMapper { @Select(""" - SELECT id, email, display_name AS displayName, status, created_at AS createdAt + SELECT id, email, display_name, status, created_at FROM users WHERE id = #{id} """) Optional findById(Long id); @Select(""" - SELECT id, email, display_name AS displayName, status, created_at AS createdAt + SELECT id, email, display_name, status, created_at FROM users AND email LIKE CONCAT('%', #{email}, '%') @@ -780,12 +780,13 @@ com.example.app/ │ └── UserMapper.java (MyBatis, when needed) ├── entity/ │ └── UserEntity.java -├── request/ -│ ├── CreateUserRequest.java -│ ├── UpdateUserRequest.java -│ └── UserSearchCriteria.java -├── response/ -│ └── UserResponse.java +├── domain/ +│ ├── request/ +│ │ ├── CreateUserRequest.java +│ │ ├── UpdateUserRequest.java +│ │ └── UserSearchCriteria.java +│ └── response/ +│ └── UserResponse.java └── enums/ └── UserStatus.java ``` @@ -822,4 +823,3 @@ public class App { - Spring Data JPA Reference - Jakarta Bean Validation 3.0 - springdoc-openapi 2.x -- 阿里巴巴《Java 开发手册》(层结构、Manager/Client 命名来源)