1. pom
<!-- 达梦数据库驱动 -->
<dependency>
<groupId>com.dm</groupId>
<artifactId>DmJdbcDriver18</artifactId>
<version>1.8</version>
</dependency>
maven 中央仓库里面没有,需要手动安装到 maven 本地仓库
2. druid 配置 application.properties
#数据源1
datasource.no1.driver-class-name: dm.jdbc.driver.DmDriver
datasource.no1.url=jdbc:dm://192.168.0.11:5238/SYSDBA?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no1.username=SYSDBA
datasource.no1.password=root123456789
3. 配置类
package org.fh.config;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
impor