SpringBoot集成mybatis,同时读取一个数据库中多个数据表


SpringBoot集成mybatis,同时读取一个数据库中多个数据表:

application.properties:

mybatis.config-location=classpath:mybatis/mybatis-config.xml
mybatis.mapper-locations=classpath:mybatis/mapper/PointMapper.xml,mybatis/mapper/LineMapper.xml
mybatis.type-aliases-package=com.example.demo.domain
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/your databasename?useUnicode=true&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=password

其余不变。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM