优化
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## 职责与边界
|
||||
|
||||
- Mapper 只由 `BaiyueAuthApplication.java` 对 `com.baiyue.auth` 根包按 `@Mapper` 过滤扫描;新增或移动 Mapper 后从后端根运行 `node scripts/mapper-scan-contract.mjs`,不得增加子域扫描配置。
|
||||
- 负责登录、注册、账号凭据、Access/Refresh Token、退出、密码和账号归属范围。
|
||||
- 客户主档、成员、角色权限归 `iam/`;Auth 通过 IAM 客户端获取授权快照,不跨库写 IAM。
|
||||
- 修改国内/海外 Token、Audience、JWKS 或跨区域身份边界前,先读 `../../docs/跨区域认证与服务通信契约.md`。
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.baiyue.auth;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -8,7 +9,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
/**
|
||||
* 认证服务启动入口,负责装配统一登录、令牌签发与会话管理相关组件。
|
||||
*/
|
||||
@MapperScan("com.baiyue.auth.mapper")
|
||||
@MapperScan(basePackages = "com.baiyue.auth", annotationClass = Mapper.class)
|
||||
@EnableFeignClients(basePackages = "com.baiyue.auth.client")
|
||||
@SpringBootApplication(scanBasePackages = "com.baiyue")
|
||||
public class BaiyueAuthApplication {
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.baiyue.auth.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import com.baiyue.auth.entity.AuthAccount;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 认证账号 MyBatis-Plus 数据访问接口,负责 {@code auth_account} 表的基础持久化操作。
|
||||
*/
|
||||
@Mapper
|
||||
public interface AuthAccountMapper extends BaseMapper<AuthAccount> { }
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.baiyue.auth.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import com.baiyue.auth.entity.AuthRefreshToken;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 刷新令牌 MyBatis-Plus 数据访问接口,负责 {@code auth_refresh_token} 表的基础持久化操作。
|
||||
*/
|
||||
@Mapper
|
||||
public interface AuthRefreshTokenMapper extends BaseMapper<AuthRefreshToken> { }
|
||||
|
||||
Reference in New Issue
Block a user