package json-schema-validator-i18n-support in fizz-common (#135)

This commit is contained in:
zhong-jie
2021-04-21 09:43:46 +08:00
committed by GitHub
parent 69625440dd
commit 24168d6b35
10 changed files with 166 additions and 34 deletions

View File

@@ -33,12 +33,11 @@
<dependencies>
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
<version>1.0.39_4</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/json-schema-validator-i18n-support-1.0.39_4.jar</systemPath>
<groupId>com.fizzgate</groupId>
<artifactId>fizz-common</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>com.fizzgate</groupId>
<artifactId>fizz-spring-boot-starter</artifactId>

View File

@@ -20,8 +20,6 @@
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
<version>1.0.39_4</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/json-schema-validator-i18n-support-1.0.39_4.jar</systemPath>
</dependency>
<dependency>
@@ -102,4 +100,42 @@
</dependency>
</dependencies>
<repositories>
<repository>
<id>repo</id>
<url>file://${project.basedir}/repo</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>true</minimizeJar>
<artifactSet>
<includes>
<include>com.networknt:json-schema-validator-i18n-support</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.networknt</pattern>
<shadedPattern>we.repackaged.com.networknt</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -20,13 +20,18 @@
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
<version>1.0.39_4</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/json-schema-validator-i18n-support-1.0.39_4.jar</systemPath>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fizzgate</groupId>
<artifactId>fizz-common</artifactId>
<exclusions>
<exclusion>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@@ -259,4 +264,10 @@
</dependency>
</dependencies>
<repositories>
<repository>
<id>repo</id>
<url>file://${project.basedir}/repo</url>
</repository>
</repositories>
</project>

View File

@@ -89,7 +89,11 @@ public class Pipeline {
}
long t1 = System.currentTimeMillis();
List<String> validateErrorList = inputValidate(input, clientInput);
@SuppressWarnings("unchecked")
List<String> validateErrorList = inputValidate(input,
(Map<String, Object>)((Map<String, Object>)this.stepContext.get("input")).get("request"));
this.stepContext.addElapsedTime("入参校验", System.currentTimeMillis()-t1);
if (!CollectionUtils.isEmpty(validateErrorList)) {

View File

@@ -16,17 +16,15 @@
</properties>
<dependencies>
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
<version>1.0.39_4</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/json-schema-validator-i18n-support-1.0.39_4.jar</systemPath>
</dependency>
<dependency>
<groupId>com.fizzgate</groupId>
<artifactId>fizz-common</artifactId>
<exclusions>
<exclusion>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fizzgate</groupId>

View File

@@ -16,14 +16,6 @@
</properties>
<dependencies>
<!--<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
<version>1.0.39_4</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/json-schema-validator-i18n-support-1.0.39_4.jar</systemPath>
</dependency>-->
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-bom</artifactId>
@@ -254,6 +246,12 @@
<dependency>
<groupId>com.fizzgate</groupId>
<artifactId>fizz-common</artifactId>
<exclusions>
<exclusion>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fizzgate</groupId>

14
pom.xml
View File

@@ -63,18 +63,16 @@
<dependencyManagement>
<dependencies>
<!--<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
<version>1.0.39_4</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/json-schema-validator-i18n-support-1.0.39_4.jar</systemPath>
</dependency>-->
<dependency>
<groupId>com.fizzgate</groupId>
<artifactId>fizz-common</artifactId>
<version>${fizz.version}</version>
<exclusions>
<exclusion>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fizzgate</groupId>

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
<version>1.0.39_4</version>
<description>POM was created from install:install-file</description>
<name>JsonSchemaValidator</name>
<properties>
<java.version>1.8</java.version>
<java.testversion>1.8</java.testversion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.jackson>2.10.0</version.jackson>
<version.slf4j>1.7.25</version.slf4j>
<version.common-lang3>3.5</version.common-lang3>
<version.joni>2.1.31</version.joni>
<version.logback>1.2.3</version.logback>
<version.junit>4.12</version.junit>
<version.mockito>2.7.21</version.mockito>
<version.hamcrest>1.3</version.hamcrest>
<version.undertow>2.0.29.Final</version.undertow>
</properties>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${version.jackson}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${version.slf4j}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${version.common-lang3}</version>
</dependency>
<dependency>
<groupId>org.jruby.joni</groupId>
<artifactId>joni</artifactId>
<version>${version.joni}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${version.logback}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${version.junit}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${version.mockito}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${version.hamcrest}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<version>${version.undertow}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>
<versioning>
<release>1.0.39_4</release>
<versions>
<version>1.0.39_4</version>
</versions>
<lastUpdated>20210420061309</lastUpdated>
</versioning>
</metadata>