Commit 7916ff94 authored by fangxinjiang's avatar fangxinjiang

商险调整

parent 0779a98c
package com.yifu.cloud.plus.v1.yifu.insurances.config;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.plugins.YifuPaginationInnerInterceptor;
import lombok.extern.log4j.Log4j2;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
......@@ -23,6 +25,7 @@ import javax.sql.DataSource;
* @description TODO
* @date 2022-08-25 17:03:43
*/
@Log4j2
@Configuration
@MapperScan(basePackages = "com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp", sqlSessionTemplateRef = "ekpSqlSessionTemplate", sqlSessionFactoryRef = "ekpSqlSessionFactory")
public class EkpDataSourceConfig {
......@@ -46,6 +49,7 @@ public class EkpDataSourceConfig {
public SqlSessionFactory ekpSqlSessionFactory(@Qualifier("ekpDataSource") DataSource dataSource) throws Exception {
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
bean.setDataSource(dataSource);
log.error(JSON.toJSONString("商险EKP数据库:"+DataSource));
//添加XML目录
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment