MyBatis Flex与MyBatis Plus多租户使用上的区别
摘要:一、配置类 1、MP实现TenantLineHandler类,定义租户过滤规则。可配置单个租户Id过滤、租户字段、忽略表。启动时租户Id为空会报错; 2、MF实现TenantFactory类定义过滤规则。可配置多个租户Id、通过字段注解配置租户字段,没有忽略表配置项。租户Id为空时忽略租户条件。 二
阅读全文
项目使用腾讯云CDB后中文查询无结果问题解决
摘要:1、问题:切换到腾讯云数据库后,搜索条件带中文时查无结果。如下图 2、解决方法:经检查数据库、表、字段的编码格式均无问题,debug代码没报错,怀疑是CDB配置问题,逐个检查参数配置。最终解决方法如下: 将服务器字符集改为utf8mb4即可,默认为latin1。
阅读全文
IDEA全局搜索,File Mask筛选列表为空问题解决
摘要:1、找到该配置文件的默认目录: C:\Users\用户名\AppData\Roaming\JetBrains\IntelliJIdea2021.1\options\find.xml 2、先备份,再打开文件选择添加自己需要的部分: <application> <component name="Find
阅读全文
Nginx发布前端项目,解决F5刷新跳404问题
摘要:1. 解决方式: 在 location 模块添加一行配置: try_files $uri $uri/ /index.html; 如下: location / { index index.html; root /opt/data/ganss-vue; try_files $uri $uri/ /ind
阅读全文
Nacos1.3.0配置MySQL8
摘要:1. 下载源码,修改根 pom 文件的 mysql 依赖版本: 2. 修改 com.alibaba.nacos.naming.healthcheck.MysqlHealthCheckProcessor,import 导入 com.mysql.cj.jdbc.MysqlDataSource 依赖: 3
阅读全文
Git常用操作
摘要:1. 切换分支 git fetch --all git reset --hard origin/master git checkout dev 2. http模式实现不同项目使用不同账号 git clone http://账号或邮箱:密码@git仓库链接 ps: 账号、邮箱或密码中有@字符时,转义成
阅读全文
CentOS7卸载MySQL8安装MySQL5.7(yum)
摘要:1. 关闭 mysql 服务 systemctl stop mysqld.service 2. 查看当前 mysql 安装状况 rpm -qa | grep -i mysql 或 yum list installed | grep mysql 3. 卸载上述命令查询出的已安装程序 yum remov
阅读全文
通过命令行将第三方jar包上传到Nexus3
摘要:1. Nexus2 才支持通过网页上传文件,Nexus3不支持,只能通过命令行 2. 在 Maven 默认 settings.xml 添加如下配置: 1 <server> 2 <id>gs-releases</id> 3 <username>user</username> 4 <password>p
阅读全文
CentOS7安装和配置Nexus3
摘要:1. 官网 https://www.sonatype.com/download-oss-sonatype 下载安装包,通过客户端上传安装包到服务器 2. 解压 cd /usr/local/ mkdir nexus cd /usr/local/nexus cp [src] /usr/local/nex
阅读全文
MySQL8用户/权限相关常用操作
摘要:1. 常用操作 1 # 进入mysql数据库 2 use mysql; 3 4 # 创建用户,ip填'%'表示允许所有ip 5 create user 'username'@'ip' IDENTIFIED by 'password'; 6 7 # 允许远程客户端通过密码访问 8 alter user
阅读全文
Windows环境下阿里云添加SSH Key及Git配置Key
摘要:1. 运行 git-bash.exe 进入命令行 2. 判断是否已存在本地公钥: cat ~/.ssh/id_rsa.pub 如果看到一长串以 ssh-rsa 或 ssh-dsa 开头的字符串,可以跳过 ssh-keygen 步骤 3. 生成 ssh key ssh-keygen -t rsa -C
阅读全文
Shiro自定义注解扩展@SalmonRequiresPermission
摘要:1.自定义注解 @SalmonRequiresPermission 1 import java.lang.annotation.ElementType; 2 import java.lang.annotation.Retention; 3 import java.lang.annotation.Re
阅读全文
windows下安装redis
摘要:1. github 下载 zip (或 msi) 安装包,并解压到指定目录: https://github.com/microsoftarchive/redis https://github.com/microsoftarchive/redis/releases 2. 修改 redis.window
阅读全文
Win7下使用TortoiseGit设置保存密码
摘要:1. 打开 TortoiseGit 设置,编辑 .gitconfig 文件,如图: 2. 添加下面两行配置,如图: [credential] helper = store 3. 保存退出即可
阅读全文
CentOS常用命令
摘要:1. 查看系统版本 rpm -q centos-release rpm -q redhat-release cat /proc/version
阅读全文
Windows操作路由表
摘要:route print route add 172.17.0.0 mask 255.255.0.0 192.168.99.100 route delete 172.17.0.0 mask 255.255.0.0 192.168.99.100
阅读全文
vue-element-template模板项目使用记录(持续更新)
摘要:1. npm 使用注意事项: a. node.js 使用 v8.16.0 版本,使用 v10 版本会有各种莫名其妙的报错 b. 开箱先改淘宝镜像: npm config set registry https://registry.npm.taobao.org c. 解决下载 node-sass 报错
阅读全文
前后端分离项目中后台集成shiro需要注意的二三事
摘要:1. 修改 Shiro 认证失败后默认重定向处理问题 a. 继承需要使用的 ShiroFilter,重载 onAccessDenied() 方法: b. 在 Shiro 配置类中使用自定义配置: 2. 跨域及 cookie 丢失问题 a. 前端创建 axios 实例时添加配置: b. 后端配置 Co
阅读全文
SpringBoot设置SORS的几种方式
摘要:1. 原生支持 Application 启动类添加以下代码: 2. 自定义 Filter 3. 自定义Configuration 略
阅读全文
几种 MyBatis 增强插件
摘要:1. mybatis-generator/mybatis-generator-gui 2. 通用mapper 3. mybatis-plus 4. fastmybatis 5. mybatis-enhance 参考文章: https://blog.csdn.net/m0_37524586/artic
阅读全文