修复 Spring 2.3.x 升级到更新版本出现的跨域问题

异常提示:

When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead.

#解决办法:
跨域配置报错,将.allowedOrigins替换成.allowedOriginPatterns即可。

修复 SpringFox 3.0.0 不兼容 SpringBoot 2.6.4 的问题

异常提示:

Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException

原因分析:

SpringFox 3.0.0 不兼容 SpringBoot 2.6.4

解决方案:

【转】Mybatis-Plus 通用枚举类型的使用

有些字段,例如性别、婚姻状况、等标志性字段,在数据库中存放的形式往往是数字,0 或者 1,这样做的好处是存取的效率高节省空间,但是前端的在展示的时候不能直接展示,需要进行一个判断,但是判断逻辑放在前端不妥,所以后端应该提前将值转换好返回该前端。

2021年的MacOS BigSur系统外接2k显示屏及字体虚化锯齿的解决方案整理

1. 关闭系统 SIP

https://zhuanlan.zhihu.com/p/343151907

执行命令前需要关闭SIP(系统完整性保护),具体做法是:
进入恢复模式(开机时按住 command+R 键),在右上角打开系统终端,输入 csrutil disable(禁用)命令,在开启hidpi后可重新使用命令 csrutil enable (开启)。具体可参考,>>传送门

Linux启动时,如何编辑GRUB2的启动参数

To edit Grub2 during the boot process try the following:

为了在启动时,编辑GRUB2,可以尝试下面的步骤

  1. Immediately after the BIOS splash screen during boot, press and hold the SHIFT button. This will display you grub containing a list of kernels and recovery options
    在启动过程中出现 BIOS 启动画面后,立即按住SHIFT按键。
    这将显示包含内核和恢复选项列表的grub