diff --git a/continew-starter-dependencies/pom.xml b/continew-starter-dependencies/pom.xml
index a4053b5d..55f5ee74 100644
--- a/continew-starter-dependencies/pom.xml
+++ b/continew-starter-dependencies/pom.xml
@@ -69,7 +69,7 @@
15.4
2.0.0
1.12.626
- 2.3.1
+ 2.4.0
4.4.0
2.14.4
3.1.6
diff --git a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/autoconfigure/CrudAutoConfiguration.java b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/autoconfigure/CrudAutoConfiguration.java
index 95f7919b..bf3fa42f 100644
--- a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/autoconfigure/CrudAutoConfiguration.java
+++ b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/autoconfigure/CrudAutoConfiguration.java
@@ -21,7 +21,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.web.accept.ContentNegotiationManager;
@@ -38,7 +37,6 @@ import top.charles7c.continew.starter.extension.crud.handler.CrudRequestMappingH
*/
@Slf4j
@AutoConfiguration
-@Import({UserNicknameContainer.class})
public class CrudAutoConfiguration extends DelegatingWebMvcConfiguration {
/**
diff --git a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/autoconfigure/UserNicknameContainer.java b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/autoconfigure/UserNicknameContainer.java
deleted file mode 100644
index 378717dd..00000000
--- a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/autoconfigure/UserNicknameContainer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
- *
- * 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
- *
- * http://www.gnu.org/licenses/lgpl.html
- *
- * 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.charles7c.continew.starter.extension.crud.autoconfigure;
-
-import cn.crane4j.core.container.Container;
-import cn.hutool.core.collection.CollUtil;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Component;
-import top.charles7c.continew.starter.extension.crud.base.CommonUserService;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
-/**
- * 用户昵称容器
- *
- * @author Charles7c
- * @since 1.2.0
- */
-@Component
-@RequiredArgsConstructor
-public class UserNicknameContainer implements Container {
-
- private final CommonUserService userService;
-
- @Override
- public String getNamespace() {
- return "userNickname";
- }
-
- @Override
- public Map get(Collection ids) {
- Long id = CollUtil.getFirst(ids);
- String name = userService.getNicknameById(id);
- return Collections.singletonMap(id, name);
- }
-}
\ No newline at end of file
diff --git a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/BaseDetailResp.java b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/BaseDetailResp.java
index cdfe1c02..9ed7d63e 100644
--- a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/BaseDetailResp.java
+++ b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/BaseDetailResp.java
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
+import top.charles7c.continew.starter.extension.crud.constant.ContainerConstants;
import java.io.Serial;
import java.time.LocalDateTime;
@@ -44,7 +45,7 @@ public class BaseDetailResp extends BaseResp {
* 修改人
*/
@JsonIgnore
- @Assemble(container = "userNickname", props = @Mapping(ref = "updateUserString"))
+ @Assemble(container = ContainerConstants.USER_NICKNAME, props = @Mapping(ref = "updateUserString"))
private Long updateUser;
/**
diff --git a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/BaseResp.java b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/BaseResp.java
index 81ba8af4..42b10422 100644
--- a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/BaseResp.java
+++ b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/BaseResp.java
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
+import top.charles7c.continew.starter.extension.crud.constant.ContainerConstants;
import java.io.Serializable;
import java.time.LocalDateTime;
@@ -49,7 +50,7 @@ public class BaseResp implements Serializable {
* 创建人
*/
@JsonIgnore
- @Assemble(container = "userNickname", props = @Mapping(ref = "createUserString"))
+ @Assemble(container = ContainerConstants.USER_NICKNAME, props = @Mapping(ref = "createUserString"))
private Long createUser;
/**
diff --git a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/CommonUserService.java b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/CommonUserService.java
index 6483faaf..7afe87e1 100644
--- a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/CommonUserService.java
+++ b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/base/CommonUserService.java
@@ -16,6 +16,10 @@
package top.charles7c.continew.starter.extension.crud.base;
+import cn.crane4j.annotation.ContainerMethod;
+import cn.crane4j.annotation.MappingType;
+import top.charles7c.continew.starter.extension.crud.constant.ContainerConstants;
+
/**
* 公共用户业务接口
*
@@ -30,5 +34,6 @@ public interface CommonUserService {
* @param id ID
* @return 昵称
*/
+ @ContainerMethod(namespace = ContainerConstants.USER_NICKNAME, type = MappingType.NONE)
String getNicknameById(Long id);
}
diff --git a/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/constant/ContainerConstants.java b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/constant/ContainerConstants.java
new file mode 100644
index 00000000..658d70da
--- /dev/null
+++ b/continew-starter-extension/continew-starter-extension-crud/src/main/java/top/charles7c/continew/starter/extension/crud/constant/ContainerConstants.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
+ *
+ * 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
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * 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.charles7c.continew.starter.extension.crud.constant;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+/**
+ * 数据源容器相关常量(Crane4j 数据填充组件使用)
+ *
+ * @author Charles7c
+ * @since 1.2.0
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class ContainerConstants {
+
+ /**
+ * 用户昵称
+ */
+ public static final String USER_NICKNAME = "UserNickname";
+}
\ No newline at end of file