From 46ece32617db615d88636621758243e49f5ae482 Mon Sep 17 00:00:00 2001 From: YoVinchen <76760071+yovinchen@users.noreply.github.com> Date: Sun, 25 Jun 2023 22:27:18 +0800 Subject: [PATCH] Update README.md --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd051ca..f1d7b76 100644 --- a/README.md +++ b/README.md @@ -55,4 +55,73 @@ 4.项目中使用JWT加密token,用作用户登录身份校验,用 SpringSecurity 来做权限控制,涉及多表查询,是项目的重点 -5. +###5、后端常见问题 + +#### 5.1、跨域问题 + +**访问协议**: http https + +**ip地址(域名)**: oa.atguigu.com oa.baidu.com + +**端口号**:8800 9528 + +**多种解决方式:** + +(1)在controller类上面添加注解 + +(2)在前端进行配置 + + + +#### 5.2、mapper扫描问题 + +```java +//第一种方式 :创建配置类,使用@MapperScan注解 +@Configuration +@MapperScan(basePackages = {"com.atguigu.auth.mapper","com.atguigu.process.mapper","com.atguigu.wechat.mapper"}) +public class MybatisPlusConfig { + +} + +//第二种方式:在mapper的接口上面添加注解 @Mapper +@Mapper +public interface SysMenuMapper extends BaseMapper { + +} +``` + + + +#### 5.3、xml文件加载问题 + +**Maven默认情况下,在src - main -java目录下面,只会加载java类型文件,其他类型文件不会加载的** + +**第一种解决方式:把xml文件放到resources目录下** + +**第二种解决方式:在pom.xml和项目配置文件进行配置** + + + +#### 5.4、流程定义部署zip文件 + +**zip文件规范(要求)** + +**(1)zip文件名称和流程key保持一致** + +例如: 文件名称 qingjia.zip + +**(2)在zip文件打包xml文件,xml文件命名 .bpmn20.xml** + +例如:jiaban.bpmn20.xml + + + +#### 5.5、内网穿透问题 + +**接口和页面在本地localhost,公众号不能直接访问本地路径的,需要使用内网穿透** + +有两个用途: + +**第一个:公众号页面通过内网穿透到本地页面 9090** + +**第二个:公众号里面接口通过内网穿透到本地接口 8800**