后端学习总结

1、springboot解决中文乱码问题:

Ubuntu配置源时如果是mac电脑配置阿里源,需要加ports去下载

2、Compilation error after upgrading to JDK 22 - “NoSuchFieldError: JCImport does not have member field JCTree qualid”

The culprit is Lombok. The minimal Lombok version compatible with JDK 21 is 1.18.30.
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.30</version>
    <optional>true</optional>
</dependency>

43214

3、springboot解决中文乱码问题:

配置
server:
  port: 8081
  servlet:
    encoding:
      charset: utf-8
      enabled: true
      force: true

4、Mac 安装homebrew 配置环境变量

直接github下载

export PATH="/opt/homebrew/bin":"$PATH"


MAC总是要source一下这个才会生效
# 查看 brew.git 当前源
$ cd "$(brew --repo)" && git remote -v
origin    https://github.com/Homebrew/brew.git (fetch)
origin    https://github.com/Homebrew/brew.git (push)

# 查看 homebrew-core.git 当前源
$ cd "$(brew --repo homebrew/core)" && git remote -v
origin    https://github.com/Homebrew/homebrew-core.git (fetch)
origin    https://github.com/Homebrew/homebrew-core.git (push)

# 修改 brew.git 为阿里源
$ git -C "$(brew --repo)" remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

# 修改 homebrew-core.git 为阿里源
$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

# zsh 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
$ source ~/.zshrc

# bash 替换 brew bintray 镜像
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
$ source ~/.bash_profile

# 刷新源
$ brew update


source .bash_profile
source ~/.bash_profile


brew install --cask --appdir=/Applications docker // 一直安装不成功

当你使用 Homebrew 安装软件时,软件通常会被安装到 Homebrew 的默认目录下,这个目录通常是 /usr/local(macOS)

5 、Caused by:java.lang.NoClassDefFoundError:org spring framework boot Default Properties Property Source:

改Springboot 配置

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.0</version>
<!--        <version>2.3.12.RELEASE</version>-->
    <relativePath/>
</parent>

6 、Cause: org.apache.ibatis.ognl.OgnlException

Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.NoClassDefFoundError: Could not initialize class com.baomidou.mybatisplus.core.toolkit.support.SerializedLambdaMeta]

原因:mybatisplus版本问题之前用的3.4.3后面改成3.4.2就好了

6 、NOGROUP No such key ‘stream.orders’ or consumer group ‘g1’ in XREADGROUP with GROUP option

原因:redis中没有stream.orders键

XGROUP CREATE stream.orders g1 0 MKSTREAM
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值