天天看點

mybatis 報cglib錯誤

mybatis項目運作時報如下錯誤:

Caused by: java.lang.IllegalStateException: Cannot enable lazy loading because CGLIB is not available. Add CGLIB to your classpath.

解決:

添加 cglib 包:

<dependency>

<groupId>cglib</groupId>

<artifactId>cglib</artifactId>

<version>3.1</version>

</dependency>