zoukankan      html  css  js  c++  java
  • Spring Boot MyBatis配置多种数据库

    mybatis-config.xml是支持配置多种数据库的,本文将介绍在Spring Boot中使用配置类来配置。

    1. 配置application.yml

    # mybatis配置
    mybatis:
      check-config-location: false
      type-aliases-package: ${base.package}.model
      configuration:
        map-underscore-to-camel-case: true
        # 二级缓存的总开关
        cache-enabled: false
      mapper-locations: classpath:mapping/*.xml

    2. 新增数据源配置类

  • 相关阅读:
    yii required 字段去除*号
    shtml用include加载文件,apache开启SSI,及shtml压缩
    门户站点用html或shtml文件格式的原因
    Apache配置shtml
    数据库迁移工具
    SQL SERVER2005 级联删除
    MySql级联删除和更新
    js只允许输入数字和小数点
    表格中的数据为空时,td的边框不显示
    MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
  • 原文地址:https://www.cnblogs.com/jpfss/p/11242716.html
Copyright © 2011-2022 走看看