所谓别名, 就是在mappper.xml配置文件中像什么resultType="xxx" 不需要写全限定类名, 只需要写类名即可. 配置方式有两种:

1. 在 application.yml中 

#mybatis相关配置
mybatis:
  type-aliases-package: com.zzuli.domain

2. 在application.properties中

mybatis.type-aliases-package=cn.byzt.bean  

两种方式选其一即可.

注意: 在SpringBoot项目中不需要配置 MyBatis的核心配置文件!!! 

相关文章:

  • 2022-02-28
  • 2021-05-07
  • 2021-09-13
  • 2021-07-13
  • 2022-02-19
  • 2021-11-09
  • 2022-01-21
猜你喜欢
  • 2021-11-03
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案