mybatis plus查询遇到的坑:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: The SQL execution time is too large, please optimize !
### The error occurred while handling results
### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: The SQL execution time is too large, please optimize !
解决办法:
修改配置文件:的value值为1000。配置如下
<bean id="sqlSessionFactory" class="com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="databaseIdProvider" ref="databaseIdProvider" />
<property name="plugins">
<array>
<bean id="paginationInterceptor"
class="com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor">
<property name="dialectType" value="mysql" />
</bean>
<bean id="performanceInterceptor"
class="com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor" >
<property name="maxTime" value="1000" />
<property name="format" value="true" />
</bean>
</array>
</property>
</bean>
转载请注原文地址: https://blog.csdn.net/java_jack1/article/details/96429002