docs 补充项目注释

This commit is contained in:
AprilWind
2026-06-01 10:48:09 +08:00
parent f3ed8e82a7
commit 941c0b9032
73 changed files with 531 additions and 1 deletions
@@ -143,6 +143,12 @@ public class MPJSqlInjector extends DefaultSqlInjector {
TableHelper.init(modelClass, supplier.get());
}
/**
* 兼容旧版泛型解析逻辑,提取 Mapper 绑定的实体类型。
*
* @param mapperClass Mapper 类型
* @return Mapper 泛型中的实体类型,无法解析时返回 null
*/
@SuppressWarnings("IfStatementWithIdenticalBranches")
protected Class<?> extractModelClassOld(Class<?> mapperClass) {
Type[] types = mapperClass.getGenericInterfaces();
@@ -32,6 +32,11 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@PropertySource(value = "classpath:common-mybatis.yml", factory = YmlPropertySourceFactory.class)
public class MybatisPlusConfig {
/**
* 组装 MyBatis-Plus 核心拦截器链。
*
* @return MyBatis-Plus 拦截器
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();