package com.gxwebsoft.gxmu.module.controller; import com.gxwebsoft.common.core.web.ApiResult; import com.gxwebsoft.common.core.web.BaseController; import com.gxwebsoft.gxmu.module.entity.ModuleRegistry; import com.gxwebsoft.gxmu.module.service.ModuleRegistryService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; /** * 模块注册表控制器 * *

前端启动时一次性拉取启用模块清单并缓存,模块下拉、详情页、导出模板都从这里驱动。 * * @author Codex * @since 2026-11-10 */ @Api(tags = "模块注册表") @RestController @RequestMapping("/api/gxmu/module-registry") public class ModuleRegistryController extends BaseController { @Resource private ModuleRegistryService moduleRegistryService; @ApiOperation("启用模块清单") @PreAuthorize("isAuthenticated()") @GetMapping("/list") public ApiResult> list() { return success(moduleRegistryService.listEnabled()); } }