From 582f2171e965d0e9b16b08ce74af8d3819e69211 Mon Sep 17 00:00:00 2001 From: Bilwa ST Date: Fri, 18 Oct 2024 16:37:37 +0530 Subject: [PATCH] [Bug] [Seatunnel-web] Tasks pagination is not working --- .../app/config/MybatisPlusConfig.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/config/MybatisPlusConfig.java diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/config/MybatisPlusConfig.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/config/MybatisPlusConfig.java new file mode 100644 index 000000000..b1607762c --- /dev/null +++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/config/MybatisPlusConfig.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.app.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; + +@Configuration +public class MybatisPlusConfig { + + @Bean + public MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); + return interceptor; + } +}