Skip to content

Commit

Permalink
升级knife4j、mybatisplus、justauth、minidao版本
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangdaiscott committed Mar 18, 2024
1 parent 990f79f commit 10a3e9c
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 66 deletions.
9 changes: 7 additions & 2 deletions jeecg-boot-base-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.version}</version>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand Down Expand Up @@ -183,9 +183,14 @@
</dependency>

<!-- knife4j -->
<dependency>
<!-- <dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>${knife4j-spring-boot-starter.version}</version>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,6 @@
package org.jeecg.common.util.sqlInjection.parse;

import net.sf.jsqlparser.expression.AllValue;
import net.sf.jsqlparser.expression.AnalyticExpression;
import net.sf.jsqlparser.expression.AnyComparisonExpression;
import net.sf.jsqlparser.expression.ArrayConstructor;
import net.sf.jsqlparser.expression.ArrayExpression;
import net.sf.jsqlparser.expression.BinaryExpression;
import net.sf.jsqlparser.expression.CaseExpression;
import net.sf.jsqlparser.expression.CastExpression;
import net.sf.jsqlparser.expression.CollateExpression;
import net.sf.jsqlparser.expression.ConnectByRootOperator;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
import net.sf.jsqlparser.expression.DateValue;
import net.sf.jsqlparser.expression.DoubleValue;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.ExpressionVisitor;
import net.sf.jsqlparser.expression.ExtractExpression;
import net.sf.jsqlparser.expression.Function;
import net.sf.jsqlparser.expression.HexValue;
import net.sf.jsqlparser.expression.IntervalExpression;
import net.sf.jsqlparser.expression.JdbcNamedParameter;
import net.sf.jsqlparser.expression.JdbcParameter;
import net.sf.jsqlparser.expression.JsonAggregateFunction;
import net.sf.jsqlparser.expression.JsonExpression;
import net.sf.jsqlparser.expression.JsonFunction;
import net.sf.jsqlparser.expression.JsonFunctionExpression;
import net.sf.jsqlparser.expression.KeepExpression;
import net.sf.jsqlparser.expression.LongValue;
import net.sf.jsqlparser.expression.MySQLGroupConcat;
import net.sf.jsqlparser.expression.NextValExpression;
import net.sf.jsqlparser.expression.NotExpression;
import net.sf.jsqlparser.expression.NullValue;
import net.sf.jsqlparser.expression.NumericBind;
import net.sf.jsqlparser.expression.OracleHierarchicalExpression;
import net.sf.jsqlparser.expression.OracleHint;
import net.sf.jsqlparser.expression.OracleNamedFunctionParameter;
import net.sf.jsqlparser.expression.Parenthesis;
import net.sf.jsqlparser.expression.RowConstructor;
import net.sf.jsqlparser.expression.RowGetExpression;
import net.sf.jsqlparser.expression.SignedExpression;
import net.sf.jsqlparser.expression.StringValue;
import net.sf.jsqlparser.expression.TimeKeyExpression;
import net.sf.jsqlparser.expression.TimeValue;
import net.sf.jsqlparser.expression.TimestampValue;
import net.sf.jsqlparser.expression.TimezoneExpression;
import net.sf.jsqlparser.expression.TryCastExpression;
import net.sf.jsqlparser.expression.UserVariable;
import net.sf.jsqlparser.expression.ValueListExpression;
import net.sf.jsqlparser.expression.VariableAssignment;
import net.sf.jsqlparser.expression.WhenClause;
import net.sf.jsqlparser.expression.XMLSerializeExpr;
import net.sf.jsqlparser.expression.*;
import net.sf.jsqlparser.expression.operators.arithmetic.Addition;
import net.sf.jsqlparser.expression.operators.arithmetic.BitwiseAnd;
import net.sf.jsqlparser.expression.operators.arithmetic.BitwiseLeftShift;
Expand Down Expand Up @@ -215,6 +166,23 @@ public void visit(Between expr) {
expr.getBetweenExpressionEnd().accept(this);
}

/**
* 用于处理 OverlapsCondition 类型的表达式
* @param overlapsCondition
*/
@Override
public void visit(OverlapsCondition overlapsCondition) {
constFlag.set(false);
}
/**
* 用于处理 SafeCastExpression 类型的表达式。
* @param safeCastExpression
*/
@Override
public void visit(SafeCastExpression safeCastExpression) {
constFlag.set(false);
}

@Override
public void visit(EqualsTo expr) {
visitBinaryExpression(expr);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jeecg.config;


import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.constant.CommonConstant;
import org.springframework.beans.BeansException;
Expand All @@ -19,15 +18,13 @@
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;

import java.lang.reflect.Field;
import java.util.ArrayList;
Expand All @@ -39,8 +36,7 @@
* @Author scott
*/
@Configuration
@EnableSwagger2 //开启 Swagger2
@EnableKnife4j //开启 knife4j,可以不写
@EnableSwagger2WebMvc
@Import(BeanValidatorPluginsConfiguration.class)
public class Swagger2Config implements WebMvcConfigurer {

Expand Down Expand Up @@ -152,7 +148,7 @@ public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {

@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
if (bean instanceof WebMvcRequestHandlerProvider) {
customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
}
return bean;
Expand Down
7 changes: 6 additions & 1 deletion jeecg-server-cloud/jeecg-cloud-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@
<!-- Swagger API文档 -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>${knife4j-spring-boot-starter.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
32 changes: 26 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
<xxl-job-core.version>2.2.0</xxl-job-core.version>
<fastjson.version>1.2.83</fastjson.version>
<pegdown.version>1.6.0</pegdown.version>
<knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version>
<knife4j-spring-ui.version>2.0.9</knife4j-spring-ui.version>
<knife4j-spring-boot-starter.version>4.4.0</knife4j-spring-boot-starter.version>
<!-- 数据库驱动 -->
<postgresql.version>42.2.25</postgresql.version>
<ojdbc6.version>11.2.0.3</ojdbc6.version>
Expand All @@ -52,13 +51,14 @@
<dm8.version>8.1.1.49</dm8.version>

<!-- 持久层 -->
<mybatis-plus.version>3.5.3.1</mybatis-plus.version>
<mybatis-plus.version>3.5.5</mybatis-plus.version>
<dynamic-datasource-spring-boot-starter.version>4.1.3</dynamic-datasource-spring-boot-starter.version>
<druid.version>1.2.19</druid.version>
<minidao.version>1.9.5</minidao.version>
<minidao.version>1.9.7</minidao.version>

<!-- 积木报表-->
<jimureport-spring-boot-starter.version>1.7.2-beta</jimureport-spring-boot-starter.version>
<commons-io.version>2.11.0</commons-io.version>
<commons.version>2.6</commons.version>
<aliyun-java-sdk-dysmsapi.version>2.1.0</aliyun-java-sdk-dysmsapi.version>
<aliyun.oss.version>3.11.2</aliyun.oss.version>
Expand All @@ -69,7 +69,7 @@
<codegenerate.version>1.4.6</codegenerate.version>
<autopoi-web.version>1.4.7</autopoi-web.version>
<minio.version>8.0.3</minio.version>
<justauth-spring-boot-starter.version>1.3.4</justauth-spring-boot-starter.version>
<justauth-spring-boot-starter.version>1.4.0</justauth-spring-boot-starter.version>
<dom4j.version>1.6.1</dom4j.version>
<qiniu-java-sdk.version>7.4.0</qiniu-java-sdk.version>
<!-- Log4j2爆雷漏洞 -->
Expand Down Expand Up @@ -365,6 +365,18 @@
<artifactId>commons-lang</artifactId>
<groupId>commons-lang</groupId>
</exclusion>
<exclusion>
<artifactId>commons-collections</artifactId>
<groupId>commons-collections</groupId>
</exclusion>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
<exclusion>
<artifactId>commons-io</artifactId>
<groupId>commons-io</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- minidao -->
Expand Down Expand Up @@ -394,7 +406,15 @@
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-chatgpt</artifactId>
<version>${jeecgboot.version}</version>
<version>${jeecgboot.version}</version>
</dependency>

<!--flyway 支持 mysql5.7+、MariaDB10.3.16-->
<!--mysql5.6,需要把版本号改成5.2.1-->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>7.15.0</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down

0 comments on commit 10a3e9c

Please sign in to comment.