Activiti-springboot uses custom mybatis-mapper

  activiti, springboot

Add a custom configuration to application.properties


spring.activiti.customMybatisXMLMappers=com/codecraft/dao/ProcInstMapper.xml

spring.activiti.customMybatisMappers=com.codecraft.dao.ProcInstMapper

Use way


public List<ProcInstVo> getAllProcInsts(){

        return managementService.executeCustomSql(new AbstractCustomSqlExecution<ProcInstMapper,List<ProcInstVo>>(ProcInstMapper.class) {

            @Override

            public List<ProcInstVo> execute(ProcInstMapper procInstMapper) {

                return procInstMapper.selectAllProcInsts();

            }

        });

    }

References