解决seata与mybatis的saveBatch事物管理器冲突问题

报错:

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.transaction.TransactionManager'

 

 

重写方法即可

service层

    /**
     * 批量保存
     *
     * @param baseChapterList
     * @return
     */
    boolean saveBatch(List<BaseChapter> baseChapterList);

 

 

impl:

    @Override
    @GlobalTransactional(rollbackFor = Exception.class)
    public boolean saveBatch(List<BaseChapter> baseChapterList) {
        return super.saveBatch(baseChapterList);
    }

 

posted @ 2023-07-19 16:15  fnasklf  阅读(186)  评论(0编辑  收藏  举报