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:
@@ -8,10 +8,13 @@ spring:
|
||||
url: jdbc:${DB_TYPE}://${DB_URL}:${DB_PORT}/${DB_NAME}
|
||||
username: ${DB_USER}
|
||||
password: ${DB_PASSWORD}
|
||||
jackson:
|
||||
default-property-inclusion: non_null
|
||||
property-naming-strategy: SNAKE_CASE
|
||||
date-format: ${JSON_DATE_FORMAT}
|
||||
time-zone: ${JSON_TIME_ZONE}
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
# 开启驼峰命名法
|
||||
map-underscore-to-camel-case: true
|
||||
# 开启日志输出sql语句
|
||||
log-impl: org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl
|
||||
map-underscore-to-camel-case: true
|
||||
Reference in New Issue
Block a user