springboot 同时整合hibernate JPA, mybatis代码下载
By:Roy.LiuLast updated:2019-09-25
有时候项目需要,或者迁移仙项目,或者整合几个不同的项目,很有可能遇到需要将hibernate, mybatis 共存的情况, 简单搭建了一个springboot同时用hibernate,mybatis的架子,有兴趣的,可以参考下.
最主要的就是配置文件了
其他的,参考代码吧,代码说明一切.
springboot_hibernate_mybatis integration free download
最主要的就是配置文件了
server: port: 8888 spring: datasource: type: com.zaxxer.hikari.HikariDataSource url: jdbc:mysql://localhost:3306/test_db?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai driver-class-name: com.mysql.cj.jdbc.Driver username: root password: hikari: minimum-idle: 5 maximum-pool-size: 15 auto-commit: true idle-timeout: 30000 pool-name: dbConnectionPool max-lifetime: 1800000 connection-timeout: 30000 jpa: database: mysql show-sql: false generate-ddl: false hibernate: ddl-auto: update database-platform: org.hibernate.dialect.MySQL5Dialect mybatis: type-aliases-package: com.yihaomen mapper-locations: classpath:mapper/*.xml
其他的,参考代码吧,代码说明一切.
springboot_hibernate_mybatis integration free download
From:一号门
Previous:ieok.com即将关闭
COMMENTS