mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-11-13 04:57:13 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c72259028f | |||
| 5f6822742f | |||
| aa463dff37 | |||
| 4fe067a889 | |||
| 0b342d5c73 |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,3 +1,21 @@
|
|||||||
|
## [v2.8.2](https://github.com/continew-org/continew-starter/compare/v2.8.1...v2.8.2) (2025-01-09)
|
||||||
|
|
||||||
|
### ✨ 新特性
|
||||||
|
|
||||||
|
- 【core】SpringUtils 新增获取代理对象方法 ([5f68227](https://github.com/continew-org/continew-starter/commit/5f6822742fd0f032bcc351155f0b966d24b05346))
|
||||||
|
|
||||||
|
### 💎 功能优化
|
||||||
|
|
||||||
|
- 【extension/crud】移除 CommonUserService、ContainerPool(已移动到 Admin 项目内) ([0b342d5](https://github.com/continew-org/continew-starter/commit/0b342d5c73e95b809337b939b4e1e957374bad85))
|
||||||
|
|
||||||
|
### 🐛 问题修复
|
||||||
|
|
||||||
|
- 【log】修复日志记录时所属模块和描述取值优先级失效的问题 ([4fe067a](https://github.com/continew-org/continew-starter/commit/4fe067a889f00617f03caf7ae3598466560dce33))
|
||||||
|
|
||||||
|
### 📦 依赖升级
|
||||||
|
|
||||||
|
- graceful-response 5.0.4-boot3 => 5.0.5-boot3(修复父类参数校验异常) ([aa463df](https://github.com/continew-org/continew-starter/commit/aa463dff37b658d1cb2a69e68f54790e03c4103d))
|
||||||
|
|
||||||
## [v2.8.1](https://github.com/continew-org/continew-starter/compare/v2.8.0...v2.8.1) (2025-01-06)
|
## [v2.8.1](https://github.com/continew-org/continew-starter/compare/v2.8.0...v2.8.1) (2025-01-06)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|||||||
@@ -14,21 +14,30 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package top.continew.starter.extension.crud.constant;
|
package top.continew.starter.core.util;
|
||||||
|
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据源容器相关常量(Crane4j 数据填充组件使用)
|
* Spring 工具类
|
||||||
*
|
*
|
||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
* @since 1.2.0
|
* @since 2.8.2
|
||||||
*/
|
*/
|
||||||
public class ContainerPool {
|
public class SpringUtils {
|
||||||
|
|
||||||
|
private SpringUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户昵称
|
* 获取代理对象
|
||||||
|
*
|
||||||
|
* @param target 目标对象
|
||||||
|
* @param <T> 目标对象类型
|
||||||
|
* @return 代理对象
|
||||||
|
* @since 2.8.2
|
||||||
*/
|
*/
|
||||||
public static final String USER_NICKNAME = "UserNickname";
|
public static <T> T getProxy(T target) {
|
||||||
|
return (T)SpringUtil.getBean(target.getClass());
|
||||||
protected ContainerPool() {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- 项目版本号 -->
|
<!-- 项目版本号 -->
|
||||||
<revision>2.8.1</revision>
|
<revision>2.8.2</revision>
|
||||||
<snail-job.version>1.2.0</snail-job.version>
|
<snail-job.version>1.2.0</snail-job.version>
|
||||||
<sa-token.version>1.39.0</sa-token.version>
|
<sa-token.version>1.39.0</sa-token.version>
|
||||||
<just-auth.version>1.16.7</just-auth.version>
|
<just-auth.version>1.16.7</just-auth.version>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<nashorn.version>15.5</nashorn.version>
|
<nashorn.version>15.5</nashorn.version>
|
||||||
<x-file-storage.version>2.2.1</x-file-storage.version>
|
<x-file-storage.version>2.2.1</x-file-storage.version>
|
||||||
<aws-s3.version>1.12.780</aws-s3.version>
|
<aws-s3.version>1.12.780</aws-s3.version>
|
||||||
<graceful-response.version>5.0.4-boot3</graceful-response.version>
|
<graceful-response.version>5.0.5-boot3</graceful-response.version>
|
||||||
<crane4j.version>2.9.0</crane4j.version>
|
<crane4j.version>2.9.0</crane4j.version>
|
||||||
<knife4j.version>4.5.0</knife4j.version>
|
<knife4j.version>4.5.0</knife4j.version>
|
||||||
<tlog.version>1.5.2</tlog.version>
|
<tlog.version>1.5.2</tlog.version>
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
|
|
||||||
* <p>
|
|
||||||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* <p>
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
* <p>
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package top.continew.starter.extension.crud.service;
|
|
||||||
|
|
||||||
import cn.crane4j.annotation.ContainerMethod;
|
|
||||||
import cn.crane4j.annotation.MappingType;
|
|
||||||
import top.continew.starter.extension.crud.constant.ContainerPool;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公共用户业务接口
|
|
||||||
*
|
|
||||||
* @author Charles7c
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public interface CommonUserService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 ID 查询昵称
|
|
||||||
*
|
|
||||||
* @param id ID
|
|
||||||
* @return 昵称
|
|
||||||
*/
|
|
||||||
@ContainerMethod(namespace = ContainerPool.USER_NICKNAME, type = MappingType.ORDER_OF_KEYS)
|
|
||||||
String getNicknameById(Long id);
|
|
||||||
}
|
|
||||||
@@ -87,6 +87,7 @@ public abstract class AbstractLogHandler implements LogHandler {
|
|||||||
// 例如:@Log("新增部门") -> 新增部门
|
// 例如:@Log("新增部门") -> 新增部门
|
||||||
if (null != methodLog && CharSequenceUtil.isNotBlank(methodLog.value())) {
|
if (null != methodLog && CharSequenceUtil.isNotBlank(methodLog.value())) {
|
||||||
logRecord.setDescription(methodLog.value());
|
logRecord.setDescription(methodLog.value());
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// 例如:@Operation(summary="新增部门") -> 新增部门
|
// 例如:@Operation(summary="新增部门") -> 新增部门
|
||||||
Operation methodOperation = AnnotationUtil.getAnnotation(targetMethod, Operation.class);
|
Operation methodOperation = AnnotationUtil.getAnnotation(targetMethod, Operation.class);
|
||||||
@@ -116,6 +117,7 @@ public abstract class AbstractLogHandler implements LogHandler {
|
|||||||
Log classLog = AnnotationUtil.getAnnotation(targetClass, Log.class);
|
Log classLog = AnnotationUtil.getAnnotation(targetClass, Log.class);
|
||||||
if (null != classLog && CharSequenceUtil.isNotBlank(classLog.module())) {
|
if (null != classLog && CharSequenceUtil.isNotBlank(classLog.module())) {
|
||||||
logRecord.setModule(classLog.module());
|
logRecord.setModule(classLog.module());
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// 例如:@Tag(name = "部门管理") -> 部门管理
|
// 例如:@Tag(name = "部门管理") -> 部门管理
|
||||||
Tag classTag = AnnotationUtil.getAnnotation(targetClass, Tag.class);
|
Tag classTag = AnnotationUtil.getAnnotation(targetClass, Tag.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user