refactor(api): restructure auth endpoints with DTO validation and unified response

- Add Result<T> generic response template for standardized API output
- Introduce UserLoginDTO with validation annotations for login requests
- Migrate AuthController to use DTO binding and return Result responses
- Update AuthService interface to accept UserLoginDTO and return Boolean
- Add Jackson configuration (snake_case, non-null, date format)
- Include jackson-module-kotlin and spring-boot-starter-validation deps
This commit is contained in:
2026-05-20 17:29:04 +08:00
parent 1be634aeb1
commit 402e9e04cd
7 changed files with 77 additions and 13 deletions
+2
View File
@@ -27,6 +27,8 @@ dependencies {
implementation("org.bouncycastle:bcprov-jdk18on:1.84")
implementation("com.mysql:mysql-connector-j")
implementation("com.baomidou:mybatis-plus-spring-boot4-starter:3.5.15")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.springframework.boot:spring-boot-starter-validation")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")