【修改】 名称替换
This commit is contained in:
@@ -10,7 +10,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* 访问日志注解
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -44,7 +44,7 @@ import static pc.exam.pp.framework.common.util.json.JsonUtils.toJsonString;
|
||||
*
|
||||
* 目的:记录 API 访问日志到数据库中
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Slf4j
|
||||
public class ApiAccessLogFilter extends ApiRequestFilter {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.stream.IntStream;
|
||||
*
|
||||
* 目的:在非 prod 环境时,打印 request 和 response 两条日志到日志文件(控制台)中。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Slf4j
|
||||
public class ApiAccessLogInterceptor implements HandlerInterceptor {
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
* 1. API 访问日志:记录用户访问 API 的访问日志,定期归档历史日志。
|
||||
* 2. 异常日志:记录用户访问 API 的系统异常,方便日常排查问题与告警。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
package pc.exam.pp.framework.apilog;
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.springframework.context.annotation.Bean;
|
||||
/**
|
||||
* Banner 的自动配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@AutoConfiguration
|
||||
public class ExamBannerAutoConfiguration {
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.concurrent.TimeUnit;
|
||||
/**
|
||||
* 项目启动成功后,提供文档相关的地址
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Slf4j
|
||||
public class BannerApplicationRunner implements ApplicationRunner {
|
||||
@@ -21,50 +21,43 @@ public class BannerApplicationRunner implements ApplicationRunner {
|
||||
ThreadUtil.execute(() -> {
|
||||
ThreadUtil.sleep(1, TimeUnit.SECONDS); // 延迟 1 秒,保证输出到结尾
|
||||
log.info("\n----------------------------------------------------------\n\t" +
|
||||
"项目启动成功!\n\t" +
|
||||
"接口文档: \t{} \n\t" +
|
||||
"开发文档: \t{} \n\t" +
|
||||
"视频教程: \t{} \n" +
|
||||
"----------------------------------------------------------",
|
||||
"https://doc.iocoder.cn/api-doc/",
|
||||
"https://doc.iocoder.cn",
|
||||
"https://t.zsxq.com/02Yf6M7Qn");
|
||||
"项目启动成功!\n\t");
|
||||
|
||||
// 数据报表
|
||||
if (isNotPresent("pc.exam.pp.module.report.framework.security.config.SecurityConfiguration")) {
|
||||
System.out.println("[报表模块 exam-module-report - 已禁用][参考 https://doc.iocoder.cn/report/ 开启]");
|
||||
System.out.println("[报表模块 exam-module-report - 已禁用]");
|
||||
}
|
||||
// 工作流
|
||||
if (isNotPresent("pc.exam.pp.module.bpm.framework.flowable.config.BpmFlowableConfiguration")) {
|
||||
System.out.println("[工作流模块 exam-module-bpm - 已禁用][参考 https://doc.iocoder.cn/bpm/ 开启]");
|
||||
System.out.println("[工作流模块 exam-module-bpm - 已禁用]");
|
||||
}
|
||||
// 商城系统
|
||||
if (isNotPresent("pc.exam.pp.module.trade.framework.web.config.TradeWebConfiguration")) {
|
||||
System.out.println("[商城系统 exam-module-mall - 已禁用][参考 https://doc.iocoder.cn/mall/build/ 开启]");
|
||||
System.out.println("[商城系统 exam-module-mall - 已禁用]");
|
||||
}
|
||||
// ERP 系统
|
||||
if (isNotPresent("pc.exam.pp.module.erp.framework.web.config.ErpWebConfiguration")) {
|
||||
System.out.println("[ERP 系统 exam-module-erp - 已禁用][参考 https://doc.iocoder.cn/erp/build/ 开启]");
|
||||
System.out.println("[ERP 系统 exam-module-erp - 已禁用]");
|
||||
}
|
||||
// CRM 系统
|
||||
if (isNotPresent("pc.exam.pp.module.crm.framework.web.config.CrmWebConfiguration")) {
|
||||
System.out.println("[CRM 系统 exam-module-crm - 已禁用][参考 https://doc.iocoder.cn/crm/build/ 开启]");
|
||||
System.out.println("[CRM 系统 exam-module-crm - 已禁用]");
|
||||
}
|
||||
// 微信公众号
|
||||
if (isNotPresent("pc.exam.pp.module.mp.framework.mp.config.MpConfiguration")) {
|
||||
System.out.println("[微信公众号 exam-module-mp - 已禁用][参考 https://doc.iocoder.cn/mp/build/ 开启]");
|
||||
System.out.println("[微信公众号 exam-module-mp - 已禁用]");
|
||||
}
|
||||
// 支付平台
|
||||
if (isNotPresent("pc.exam.pp.module.pay.framework.pay.config.PayConfiguration")) {
|
||||
System.out.println("[支付系统 exam-module-pay - 已禁用][参考 https://doc.iocoder.cn/pay/build/ 开启]");
|
||||
System.out.println("[支付系统 exam-module-pay - 已禁用]");
|
||||
}
|
||||
// AI 大模型
|
||||
if (isNotPresent("pc.exam.pp.module.ai.framework.web.config.AiWebConfiguration")) {
|
||||
System.out.println("[AI 大模型 exam-module-ai - 已禁用][参考 https://doc.iocoder.cn/ai/build/ 开启]");
|
||||
System.out.println("[AI 大模型 exam-module-ai - 已禁用]");
|
||||
}
|
||||
// IoT 物联网
|
||||
if (isNotPresent("pc.exam.pp.module.iot.framework.web.config.IotWebConfiguration")) {
|
||||
System.out.println("[IoT 物联网 exam-module-iot - 已禁用][参考 https://doc.iocoder.cn/iot/build/ 开启]");
|
||||
System.out.println("[IoT 物联网 exam-module-iot - 已禁用]");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Banner 用于在 console 控制台,打印开发文档、接口文档等
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
package pc.exam.pp.framework.banner;
|
||||
|
||||
@@ -40,7 +40,7 @@ import static pc.exam.pp.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT
|
||||
* 1. Springdoc 文档地址:<a href="https://github.com/springdoc/springdoc-openapi">仓库</a>
|
||||
* 2. Swagger 规范,于 2015 更名为 OpenAPI 规范,本质是一个东西
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass({OpenAPI.class})
|
||||
|
||||
@@ -8,7 +8,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
/**
|
||||
* Swagger 配置属性
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@ConfigurationProperties("exam.swagger")
|
||||
@Data
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 基于 Swagger + Knife4j 实现 API 接口文档
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
package pc.exam.pp.framework.swagger;
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
/**
|
||||
* 过滤 /admin-api、/app-api 等 API 请求的过滤器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public abstract class ApiRequestFilter extends OncePerRequestFilter {
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.io.IOException;
|
||||
/**
|
||||
* Request Body 缓存 Filter,实现它的可重复读取
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class CacheRequestBodyFilter extends OncePerRequestFilter {
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.io.InputStreamReader;
|
||||
/**
|
||||
* Request Body 缓存 Wrapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class CacheRequestBodyWrapper extends HttpServletRequestWrapper {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import static pc.exam.pp.framework.common.exception.enums.GlobalErrorCodeConstan
|
||||
/**
|
||||
* 演示 Filter,禁止用户发起写操作,避免影响测试数据
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class DemoFilter extends OncePerRequestFilter {
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ import static pc.exam.pp.framework.common.exception.enums.GlobalErrorCodeConstan
|
||||
/**
|
||||
* 全局异常处理器,将 Exception 翻译成 CommonResult + 对应的异常编号
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@RestControllerAdvice
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -17,7 +17,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
/**
|
||||
* 专属于 web 包的工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class WebFrameworkUtils {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* Xss 配置属性
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "exam.xss")
|
||||
@Validated
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.io.IOException;
|
||||
/**
|
||||
* Xss 过滤器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
public class XssFilter extends OncePerRequestFilter {
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Xss 请求 Wrapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class XssRequestWrapper extends HttpServletRequestWrapper {
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
芋道源码 http://www.iocoder.cn
|
||||
Application Version: ${exam.info.version}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user