Could not resolve type alias 'com.github.mybatis.helper.page.PageSqlInterceptor'.

報錯信息

   Could not resolve type alias 'com.github.mybatis.helper.page.PageSqlInterceptor'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.github.mybatis.helper.page.PageSqlInterceptor 

原因

  報錯的位置是 mybatis-config.xml 文件中的 <plugin interceptor="com.github.mybatis.helper.page.PageSqlInterceptor"> </plugin> 位置,缺少相關的依賴.

解決方案

  在pom文件中增加相關的依賴,代碼如下

         <dependency>
            <groupId>com.github.willtong</groupId>
            <artifactId>mybatis-helper-page</artifactId>
            <version>2.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.willtong</groupId>
            <artifactId>mybatis-helper-datascope</artifactId>
            <version>2.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.willtong</groupId>
            <artifactId>mybatis-helper-commonfield</artifactId>
            <version>2.1.0</version>
        </dependency>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章