mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-15 20:08:18 +08:00
fix(auth): move PersonalAccessTokenMapper under repository/ for @MapperScan
This commit is contained in:
parent
3c33422a08
commit
9411dfff7b
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import vip.mate.auth.pat.repository.PersonalAccessTokenMapper;
|
||||||
import vip.mate.exception.MateClawException;
|
import vip.mate.exception.MateClawException;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|||||||
@ -1,11 +1,17 @@
|
|||||||
package vip.mate.auth.pat;
|
package vip.mate.auth.pat.repository;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import vip.mate.auth.pat.PersonalAccessTokenEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RFC-03 Lane I1 — MyBatis Plus mapper for {@link PersonalAccessTokenEntity}.
|
* RFC-03 Lane I1 — MyBatis Plus mapper for {@link PersonalAccessTokenEntity}.
|
||||||
*
|
*
|
||||||
|
* <p>Located under {@code repository} so {@code @MapperScan("vip.mate.**.repository")}
|
||||||
|
* (declared on {@code MateClawApplication}) discovers it; outside that
|
||||||
|
* package Spring won't auto-register the mapper bean and constructor
|
||||||
|
* injection into {@code PersonalAccessTokenService} fails at startup.
|
||||||
|
*
|
||||||
* <p>Lookup queries live in the service layer via {@code LambdaQueryWrapper};
|
* <p>Lookup queries live in the service layer via {@code LambdaQueryWrapper};
|
||||||
* the only custom requirement is uniqueness on {@code token_hash}, which is
|
* the only custom requirement is uniqueness on {@code token_hash}, which is
|
||||||
* enforced by the database (UNIQUE index in V76 migration).
|
* enforced by the database (UNIQUE index in V76 migration).
|
||||||
Loading…
Reference in New Issue
Block a user