升级依赖pagehelper:5.3.3——>6.1.0

This commit is contained in:
dataprince 2024-01-15 11:10:14 +08:00
parent 14740e817e
commit 54d4b8bf16
2 changed files with 13 additions and 5 deletions

View File

@ -24,7 +24,7 @@
<HikariCP.version>5.0.1</HikariCP.version> <HikariCP.version>5.0.1</HikariCP.version>
<bitwalker.version>1.21</bitwalker.version> <bitwalker.version>1.21</bitwalker.version>
<kaptcha.version>2.3.3</kaptcha.version> <kaptcha.version>2.3.3</kaptcha.version>
<pagehelper.version>5.3.3</pagehelper.version> <pagehelper.version>6.1.0</pagehelper.version>
<fastjson.version>2.0.43</fastjson.version> <fastjson.version>2.0.43</fastjson.version>
<oshi.version>6.4.8</oshi.version> <oshi.version>6.4.8</oshi.version>
<commons.collections.version>3.2.2</commons.collections.version> <commons.collections.version>3.2.2</commons.collections.version>

View File

@ -6,18 +6,20 @@ import com.mybatisflex.core.audit.ConsoleMessageCollector;
import com.mybatisflex.core.audit.MessageCollector; import com.mybatisflex.core.audit.MessageCollector;
import com.mybatisflex.core.datasource.DataSourceDecipher; import com.mybatisflex.core.datasource.DataSourceDecipher;
import com.mybatisflex.core.mybatis.FlexConfiguration; import com.mybatisflex.core.mybatis.FlexConfiguration;
import com.mybatisflex.core.query.QueryColumnBehavior;
import com.mybatisflex.spring.boot.ConfigurationCustomizer; import com.mybatisflex.spring.boot.ConfigurationCustomizer;
import com.mybatisflex.spring.boot.MyBatisFlexCustomizer; import com.mybatisflex.spring.boot.MyBatisFlexCustomizer;
import com.ruoyi.common.orm.core.domain.BaseEntity; import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.common.orm.decipher.Decipher; import com.ruoyi.common.orm.decipher.Decipher;
import com.ruoyi.common.orm.listener.EntityInsertListener; import com.ruoyi.common.orm.listener.EntityInsertListener;
import com.ruoyi.common.orm.listener.EntityUpdateListener; import com.ruoyi.common.orm.listener.EntityUpdateListener;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.logging.stdout.StdOutImpl; import org.apache.ibatis.logging.stdout.StdOutImpl;
import org.slf4j.Logger; import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/** /**
@ -25,17 +27,23 @@ import org.springframework.beans.factory.annotation.Value;
* *
* @author dataprince数据小王子 * @author dataprince数据小王子
*/ */
@EnableTransactionManagement(proxyTargetClass = true)
@AutoConfiguration
@Slf4j
@Configuration @Configuration
public class MyBatisFlexConfig implements ConfigurationCustomizer, MyBatisFlexCustomizer { public class MyBatisFlexConfig implements ConfigurationCustomizer, MyBatisFlexCustomizer {
private static final Logger logger = LoggerFactory.getLogger("mybatis-flex-sql");
@Value("${mybatis-flex.audit_enable}") @Value("${mybatis-flex.audit_enable}")
private Boolean enableAudit = false; private Boolean enableAudit = false;
@Value("${mybatis-flex.sql_print}") @Value("${mybatis-flex.sql_print}")
private Boolean sqlPrint = false; private Boolean sqlPrint = false;
static {
QueryColumnBehavior.setIgnoreFunction(QueryColumnBehavior.IGNORE_BLANK);
QueryColumnBehavior.setSmartConvertInToEquals(true);
}
/** /**
* 数据源解密 * 数据源解密
*/ */