在application.yml文件中配置数据源时后面跟上编码配置即可。?useUnicode=true&characterEncoding=UTF-8

spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/hzxx_shixi?useUnicode=true&characterEncoding=UTF-8
    username: root
    password: root

相关文章:

  • 2021-11-12
  • 2021-05-10
  • 2021-06-16
  • 2022-01-20
  • 2021-12-19
  • 2021-08-30
  • 2021-12-03
猜你喜欢
  • 2021-11-12
  • 2021-11-26
  • 2021-07-22
  • 2021-12-10
  • 2023-04-05
相关资源
相似解决方案