在application配置文件中添加如下:

mybatis:
  #该配置替换在sql-config-map中的typeAliases配置
  type-aliases-package: com.ww.wwta.model
  config-location: classpath:config/sql-map-config.xml
  # 该配置不能同时与sql-config-map里的mappers存在
  mapper-locations: classpath:config/mapper/*.xml

说明:

1、type-aliases-package: com.ww.wwta.model 该配置等效在mybatis配置文件中加:
<typeAliases>
    <typeAlias     alias="xxModel" type="com.xx.model.xxModel"/>
</typeAliases>
2、mapper-locations: classpath:config/mapper/*.xml类似在mybatis配置中加:
<mappers>
     <mapper resource="com.xx.mapper.xxMapper"></mapper>
</mappers>
 
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
猜你喜欢
  • 2022-12-23
  • 2021-04-07
  • 2022-12-23
  • 2021-09-19
  • 2021-11-03
  • 2021-06-22
  • 2021-10-24
相关资源
相似解决方案