From 8cab0c78df4bd49772ea704250ec8ed9c17ad06c Mon Sep 17 00:00:00 2001 From: redkale Date: Thu, 30 May 2024 20:35:40 +0800 Subject: [PATCH] Format --- my/pom.xml | 421 +++++++++--------- pom.xml | 365 ++++++++------- .../redkale/cache/spi/CacheKeyGenerator.java | 120 ++--- .../test/convert/proto/PSimpleBean.proto | 42 +- .../test/convert/proto/PTestBean.proto | 72 +-- 5 files changed, 509 insertions(+), 511 deletions(-) diff --git a/my/pom.xml b/my/pom.xml index db4f13022..07334b9ab 100644 --- a/my/pom.xml +++ b/my/pom.xml @@ -1,212 +1,211 @@ - - - 4.0.0 - org.redkale - redkale - jar - RedkaleProject - http://redkale.org - redkale -- java framework - 2.7.0-SNAPSHOT - - - UTF-8 - 11 - 11 - - 5.7.0 - 3.2.0 - 3.0.1 - 3.9.0 - 3.0.0 - 3.0.0 - 2.43.0 - 2.46.0 - - - - - org.junit.jupiter - junit-jupiter - ${junit.version} - test - - - - - - Apache 2 - https://www.apache.org/licenses/ - repo - Apache License - - - - - - Redkale - redkale - redkale@qq.com - https://redkale.org - - Project Manager - Architect - - redkale - https://redkale.org - - No - - 8 - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - https://github.com/redkale/redkale - scm:git:git@github.com/redkale/redkale.git - scm:git:git@github.com:redkale/redkale.git - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - -parameters - UTF-8 - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - ${maven-plugin.version} - - - false - - org.redkale.boot.Application - - - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - - sign-artifacts - verify - - sign - - - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-plugin.version} - - - - jar - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-plugin.version} - - - - jar - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - ${maven-plugin.version} - - false - - assembly.xml - - - - - redkale - package - - single - - - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - WINDOWS - - - - src/** - - - - - true - 4 - - - - - - ${palantir-java-format.version} - - true - - - - - - - check - - compile - - - - - - - + + + 4.0.0 + org.redkale + redkale + jar + RedkaleProject + http://redkale.org + redkale -- java framework + 2.7.0-SNAPSHOT + + + UTF-8 + 11 + 11 + + 5.7.0 + 3.2.0 + 3.0.1 + 3.9.0 + 3.0.0 + 3.0.0 + 2.43.0 + 2.46.0 + + + + + org.junit.jupiter + junit-jupiter + ${junit.version} + test + + + + + + Apache 2 + https://www.apache.org/licenses/ + repo + Apache License + + + + + + Redkale + redkale + redkale@qq.com + https://redkale.org + + Project Manager + Architect + + redkale + https://redkale.org + + No + + 8 + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + https://github.com/redkale/redkale + scm:git:git@github.com/redkale/redkale.git + scm:git:git@github.com:redkale/redkale.git + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + -parameters + UTF-8 + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-plugin.version} + + + false + + org.redkale.boot.Application + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + sign-artifacts + verify + + sign + + + + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-plugin.version} + + + + jar + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-plugin.version} + + + + jar + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven-plugin.version} + + false + + assembly.xml + + + + + redkale + package + + single + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + src/** + + + + + true + 4 + + + + + + ${palantir-java-format.version} + + true + + + + + + + check + + compile + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index aaec7823e..537c05474 100644 --- a/pom.xml +++ b/pom.xml @@ -1,183 +1,182 @@ - - - 4.0.0 - org.redkale - redkale - jar - RedkaleProject - https://redkale.org - redkale -- java framework - 2.8.0-SNAPSHOT - - - UTF-8 - 11 - 11 - - 5.9.0 - 3.3.0 - 3.9.0 - 3.0.0 - 3.0.0 - 2.43.0 - 2.46.0 - - - - - - Apache 2 - https://www.apache.org/licenses/ - repo - Apache License - - - - - - org.junit.jupiter - junit-jupiter - ${junit.version} - test - - - - - - central - Central Repository - https://repo.maven.apache.org/maven2 - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots - - - - - - Redkale - redkale - redkale@qq.com - https://redkale.org - - Project Manager - Architect - - redkale - https://redkale.org - - No - - 8 - - - - - https://github.com/redkale/redkale - scm:git:git@github.com/redkale/redkale.git - scm:git:git@github.com:redkale/redkale.git - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - UTF-8 - - -parameters - - - - - - org.apache.maven.plugins - maven-jar-plugin - ${maven-jar-plugin.version} - - - false - - org.redkale.boot.Application - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - once - -Dfile.encoding=UTF-8 - - - - - org.apache.maven.plugins - maven-failsafe-plugin - ${maven-failsafe-plugin.version} - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - WINDOWS - - - - src/**/java/**/*.java - - - - - true - 4 - - - - - - ${palantir-java-format.version} - - true - - - - - - - check - - compile - - - - - - - + + + 4.0.0 + org.redkale + redkale + jar + RedkaleProject + https://redkale.org + redkale -- java framework + 2.8.0-SNAPSHOT + + + UTF-8 + 11 + 11 + + 5.9.0 + 3.3.0 + 3.9.0 + 3.0.0 + 3.0.0 + 2.43.0 + 2.46.0 + + + + + + Apache 2 + https://www.apache.org/licenses/ + repo + Apache License + + + + + + org.junit.jupiter + junit-jupiter + ${junit.version} + test + + + + + + central + Central Repository + https://repo.maven.apache.org/maven2 + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + + + + Redkale + redkale + redkale@qq.com + https://redkale.org + + Project Manager + Architect + + redkale + https://redkale.org + + No + + 8 + + + + + https://github.com/redkale/redkale + scm:git:git@github.com/redkale/redkale.git + scm:git:git@github.com:redkale/redkale.git + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + UTF-8 + + -parameters + + + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + false + + org.redkale.boot.Application + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + once + -Dfile.encoding=UTF-8 + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${maven-failsafe-plugin.version} + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + src/**/java/**/*.java + + + + + true + 4 + + + + + + ${palantir-java-format.version} + + true + + + + + + + check + + compile + + + + + + + diff --git a/src/main/java/org/redkale/cache/spi/CacheKeyGenerator.java b/src/main/java/org/redkale/cache/spi/CacheKeyGenerator.java index 62ca5559d..669454281 100644 --- a/src/main/java/org/redkale/cache/spi/CacheKeyGenerator.java +++ b/src/main/java/org/redkale/cache/spi/CacheKeyGenerator.java @@ -1,60 +1,60 @@ -/* - -*/ - -package org.redkale.cache.spi; - -import java.util.Objects; -import org.redkale.util.MultiHashKey; - -/** - * 缓存key生成器 - * - * @see org.redkale.cache.Cached#key() - * - *

详情见: https://redkale.org - * - * @author zhangjx - * @since 2.8.0 - */ -public interface CacheKeyGenerator { - - /** - * 根据service和方法名生成key - * - * @param target Service对象 - * @param action CacheAction对象 - * @param params 参数值 - * @return key值 - */ - public String generate(Object target, CacheAction action, Object... params); - - /** - * 生成器的名字 - * - * @see org.redkale.cache.Cached#key() - * - * @return name - */ - public String name(); - - /** - * 根据MultiHashKey生成一个CacheKeyGenerator - * @param key MultiHashKey 不能为空 - * @return CacheKeyGenerator - */ - public static CacheKeyGenerator create(MultiHashKey key) { - Objects.requireNonNull(key); - return new CacheKeyGenerator() { - @Override - public String generate(Object target, CacheAction action, Object... params) { - return key.keyFor(params); - } - - @Override - public String name() { - return ""; - } - }; - } -} +/* + +*/ + +package org.redkale.cache.spi; + +import java.util.Objects; +import org.redkale.util.MultiHashKey; + +/** + * 缓存key生成器 + * + * @see org.redkale.cache.Cached#key() + * + *

详情见: https://redkale.org + * + * @author zhangjx + * @since 2.8.0 + */ +public interface CacheKeyGenerator { + + /** + * 根据service和方法名生成key + * + * @param target Service对象 + * @param action CacheAction对象 + * @param params 参数值 + * @return key值 + */ + public String generate(Object target, CacheAction action, Object... params); + + /** + * 生成器的名字 + * + * @see org.redkale.cache.Cached#key() + * + * @return name + */ + public String name(); + + /** + * 根据MultiHashKey生成一个CacheKeyGenerator + * @param key MultiHashKey 不能为空 + * @return CacheKeyGenerator + */ + public static CacheKeyGenerator create(MultiHashKey key) { + Objects.requireNonNull(key); + return new CacheKeyGenerator() { + @Override + public String generate(Object target, CacheAction action, Object... params) { + return key.keyFor(params); + } + + @Override + public String name() { + return ""; + } + }; + } +} diff --git a/src/test/java/org/redkale/test/convert/proto/PSimpleBean.proto b/src/test/java/org/redkale/test/convert/proto/PSimpleBean.proto index 138a52845..162c50ef1 100644 --- a/src/test/java/org/redkale/test/convert/proto/PSimpleBean.proto +++ b/src/test/java/org/redkale/test/convert/proto/PSimpleBean.proto @@ -1,21 +1,21 @@ -syntax = "proto3"; - -// 生成类的包名 -option java_package = "org.redkalex.test.protobuf"; - -message PSimpleBean { - - message PSimpleEntry { - sint32 id = 1; - string name = 2; - string email = 3; - } - - message PTwoEntry { - sint32 status = 1; - sint64 createtime = 2; - } - PSimpleEntry simple = 1; - PTwoEntry two = 2; - string strings = 3 ; -} +syntax = "proto3"; + +// 生成类的包名 +option java_package = "org.redkalex.test.protobuf"; + +message PSimpleBean { + + message PSimpleEntry { + sint32 id = 1; + string name = 2; + string email = 3; + } + + message PTwoEntry { + sint32 status = 1; + sint64 createtime = 2; + } + PSimpleEntry simple = 1; + PTwoEntry two = 2; + string strings = 3 ; +} diff --git a/src/test/java/org/redkale/test/convert/proto/PTestBean.proto b/src/test/java/org/redkale/test/convert/proto/PTestBean.proto index cf663f849..68bad1407 100644 --- a/src/test/java/org/redkale/test/convert/proto/PTestBean.proto +++ b/src/test/java/org/redkale/test/convert/proto/PTestBean.proto @@ -1,36 +1,36 @@ -syntax = "proto3"; - -// 生成类的包名 -option java_package = "org.redkalex.test.protobuf"; - -message PTestBean { - - message PTestEntry { - repeated bool bools = 1; - repeated bytes bytes = 2; - repeated sint32 chars = 3; - repeated sint32 shorts = 4; - } - - repeated bool bools = 1; - repeated bytes bytes = 2; - repeated sint32 chars = 3; - repeated PTestEntry entrys = 4; - repeated sint32 ints = 5; - repeated float floats = 6; - repeated sint64 longs = 7; - repeated double doubles = 8; - repeated string strings = 9; - sint32 id = 10; - string name = 11; - string email = 12; - Kind kind = 13; - map map = 14; - string end = 15; - - enum Kind { - ONE =0; - TWO =1; - THREE =2; - } -} +syntax = "proto3"; + +// 生成类的包名 +option java_package = "org.redkalex.test.protobuf"; + +message PTestBean { + + message PTestEntry { + repeated bool bools = 1; + repeated bytes bytes = 2; + repeated sint32 chars = 3; + repeated sint32 shorts = 4; + } + + repeated bool bools = 1; + repeated bytes bytes = 2; + repeated sint32 chars = 3; + repeated PTestEntry entrys = 4; + repeated sint32 ints = 5; + repeated float floats = 6; + repeated sint64 longs = 7; + repeated double doubles = 8; + repeated string strings = 9; + sint32 id = 10; + string name = 11; + string email = 12; + Kind kind = 13; + map map = 14; + string end = 15; + + enum Kind { + ONE =0; + TWO =1; + THREE =2; + } +}