docs(spring-boot): align examples with documented conventions

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.
This commit is contained in:
2026-06-16 15:36:12 +08:00
parent 6beb72688e
commit 3be04dab3a
+9 -9
View File
@@ -507,14 +507,14 @@ A protected no-arg constructor is required by JPA. Static factories (`fromReques
public interface UserMapper { public interface UserMapper {
@Select(""" @Select("""
SELECT id, email, display_name AS displayName, status, created_at AS createdAt SELECT id, email, display_name, status, created_at
FROM users FROM users
WHERE id = #{id} WHERE id = #{id}
""") """)
Optional<UserEntity> findById(Long id); Optional<UserEntity> findById(Long id);
@Select(""" @Select("""
SELECT id, email, display_name AS displayName, status, created_at AS createdAt SELECT id, email, display_name, status, created_at
FROM users FROM users
<where> <where>
<if test="email != null">AND email LIKE CONCAT('%', #{email}, '%')</if> <if test="email != null">AND email LIKE CONCAT('%', #{email}, '%')</if>
@@ -780,12 +780,13 @@ com.example.app/
│ └── UserMapper.java (MyBatis, when needed) │ └── UserMapper.java (MyBatis, when needed)
├── entity/ ├── entity/
│ └── UserEntity.java │ └── UserEntity.java
├── request/ ├── domain/
│ ├── CreateUserRequest.java │ ├── request/
│ ├── UpdateUserRequest.java │ ├── CreateUserRequest.java
└── UserSearchCriteria.java │ ├── UpdateUserRequest.java
├── response/ │ │ └── UserSearchCriteria.java
│ └── UserResponse.java │ └── response/
│ └── UserResponse.java
└── enums/ └── enums/
└── UserStatus.java └── UserStatus.java
``` ```
@@ -822,4 +823,3 @@ public class App {
- Spring Data JPA Reference - Spring Data JPA Reference
- Jakarta Bean Validation 3.0 - Jakarta Bean Validation 3.0
- springdoc-openapi 2.x - springdoc-openapi 2.x
- 阿里巴巴《Java 开发手册》(层结构、Manager/Client 命名来源)