mercredi 17 juin 2020

cannot run mybatis test example in myself download mybatis-3 source code - et.sf.cglib.proxy not exisit

I've download mybatis source code from github (https://github.com/mybatis/mybatis-3) and I want to run there test example in my IDEA,but it cannot compile, for

Error:(23, 26) java: 程序包net.sf.cglib.proxy不存在
Error:(67, 43) java: 找不到符号
    符号:   类 Callback
    位置: 类 org.apache.ibatis.executor.loader.cglib.CglibProxyFactory

But I can find it in my pom and jar file. And there test struct is junit,like:

import org.junit.jupiter.api.Test;

class XmlMapperBuilderTest {

    @Test
    void shouldSuccessfullyLoadXMLMapperFile() throws Exception {
        Configuration configuration = new Configuration();
        String resource = "org/apache/ibatis/builder/AuthorMapper.xml";
        try (InputStream inputStream = Resources.getResourceAsStream(resource)) {
            XMLMapperBuilder builder = new XMLMapperBuilder(inputStream, configuration, 
                                            resource, configuration.getSqlFragments());
            builder.parse();
        }
    }
    ...
}

Aucun commentaire:

Enregistrer un commentaire