From 7d80883b4aab0dbb9d47131706cba21684a1c7c4 Mon Sep 17 00:00:00 2001 From: lisang <1186733841@qq.com> Date: Thu, 27 Jun 2024 21:10:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 53 +++++++++---------- rpc-api/pom.xml | 41 +++++++------- rpc-api/src/main/java/com/shockkid/App.java | 9 ++-- .../src/test/java/com/shockkid/AppTest.java | 8 ++- rpc-client/pom.xml | 51 +++++++++--------- .../src/test/java/com/shockkid/AppTest.java | 8 ++- rpc-server/pom.xml | 51 +++++++++--------- .../java/com/shockkid/RpcProxyServer.java | 2 +- .../src/test/java/com/shockkid/AppTest.java | 8 ++- src/main/java/com/shockkid/App.java | 9 ++-- src/test/java/com/shockkid/AppTest.java | 8 ++- 11 files changed, 115 insertions(+), 133 deletions(-) diff --git a/pom.xml b/pom.xml index 7efab74..04df77f 100644 --- a/pom.xml +++ b/pom.xml @@ -1,35 +1,34 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - com.shockkid - rpc - pom - 1.0 - - rpc-api - rpc-server - rpc-client - + com.shockkid + rpc + pom + 1.0 + + rpc-api + rpc-server + rpc-client + - rpc - - http://www.example.com + rpc + https://answer.prisoncode.com/ - - UTF-8 - 1.7 - 1.7 - + + UTF-8 + 1.7 + 1.7 + - - - junit - junit - 4.11 - test - - + + + junit + junit + 4.11 + test + + diff --git a/rpc-api/pom.xml b/rpc-api/pom.xml index 6c25f69..09ebccd 100644 --- a/rpc-api/pom.xml +++ b/rpc-api/pom.xml @@ -1,29 +1,28 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - com.shockkid - rpc-api - 1.0 + com.shockkid + rpc-api + 1.0 - rpc-api - - http://www.example.com + rpc-api + https://answer.prisoncode.com/ - - UTF-8 - 1.7 - 1.7 - + + UTF-8 + 1.7 + 1.7 + - - - junit - junit - 4.11 - test - - + + + junit + junit + 4.11 + test + + diff --git a/rpc-api/src/main/java/com/shockkid/App.java b/rpc-api/src/main/java/com/shockkid/App.java index b9c882f..6239d3d 100644 --- a/rpc-api/src/main/java/com/shockkid/App.java +++ b/rpc-api/src/main/java/com/shockkid/App.java @@ -2,12 +2,9 @@ package com.shockkid; /** * Hello world! - * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/rpc-api/src/test/java/com/shockkid/AppTest.java b/rpc-api/src/test/java/com/shockkid/AppTest.java index 77525fe..4988d47 100644 --- a/rpc-api/src/test/java/com/shockkid/AppTest.java +++ b/rpc-api/src/test/java/com/shockkid/AppTest.java @@ -7,14 +7,12 @@ import org.junit.Test; /** * Unit test for simple App. */ -public class AppTest -{ +public class AppTest { /** * Rigorous Test :-) */ @Test - public void shouldAnswerWithTrue() - { - assertTrue( true ); + public void shouldAnswerWithTrue() { + assertTrue(true); } } diff --git a/rpc-client/pom.xml b/rpc-client/pom.xml index a116f69..d4f0c0b 100644 --- a/rpc-client/pom.xml +++ b/rpc-client/pom.xml @@ -1,34 +1,33 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - com.shockkid - rpc-client - 1.0 + com.shockkid + rpc-client + 1.0 - rpc-client - - http://www.example.com + rpc-client + https://answer.prisoncode.com/ - - UTF-8 - 1.7 - 1.7 - + + UTF-8 + 1.7 + 1.7 + - - - com.shockkid - rpc-api - 1.0 - - - junit - junit - 4.11 - test - - + + + com.shockkid + rpc-api + 1.0 + + + junit + junit + 4.11 + test + + diff --git a/rpc-client/src/test/java/com/shockkid/AppTest.java b/rpc-client/src/test/java/com/shockkid/AppTest.java index 77525fe..4988d47 100644 --- a/rpc-client/src/test/java/com/shockkid/AppTest.java +++ b/rpc-client/src/test/java/com/shockkid/AppTest.java @@ -7,14 +7,12 @@ import org.junit.Test; /** * Unit test for simple App. */ -public class AppTest -{ +public class AppTest { /** * Rigorous Test :-) */ @Test - public void shouldAnswerWithTrue() - { - assertTrue( true ); + public void shouldAnswerWithTrue() { + assertTrue(true); } } diff --git a/rpc-server/pom.xml b/rpc-server/pom.xml index 50cdcb7..b6514b1 100644 --- a/rpc-server/pom.xml +++ b/rpc-server/pom.xml @@ -1,34 +1,33 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - com.shockkid - rpc-server - 1.0 + com.shockkid + rpc-server + 1.0 - rpc-server - - http://www.example.com + rpc-server + https://answer.prisoncode.com/ - - UTF-8 - 1.7 - 1.7 - + + UTF-8 + 1.7 + 1.7 + - - - com.shockkid - rpc-api - 1.0 - - - junit - junit - 4.11 - test - - + + + com.shockkid + rpc-api + 1.0 + + + junit + junit + 4.11 + test + + diff --git a/rpc-server/src/main/java/com/shockkid/RpcProxyServer.java b/rpc-server/src/main/java/com/shockkid/RpcProxyServer.java index eaff08a..af25934 100644 --- a/rpc-server/src/main/java/com/shockkid/RpcProxyServer.java +++ b/rpc-server/src/main/java/com/shockkid/RpcProxyServer.java @@ -13,7 +13,7 @@ import java.util.concurrent.Executors; public class RpcProxyServer { private ExecutorService executorService = Executors.newCachedThreadPool(); - public void publisher(Object server,int prot) { + public void publisher(Object server, int prot) { ServerSocket serverSocket = null; try { serverSocket = new ServerSocket(prot); diff --git a/rpc-server/src/test/java/com/shockkid/AppTest.java b/rpc-server/src/test/java/com/shockkid/AppTest.java index 77525fe..4988d47 100644 --- a/rpc-server/src/test/java/com/shockkid/AppTest.java +++ b/rpc-server/src/test/java/com/shockkid/AppTest.java @@ -7,14 +7,12 @@ import org.junit.Test; /** * Unit test for simple App. */ -public class AppTest -{ +public class AppTest { /** * Rigorous Test :-) */ @Test - public void shouldAnswerWithTrue() - { - assertTrue( true ); + public void shouldAnswerWithTrue() { + assertTrue(true); } } diff --git a/src/main/java/com/shockkid/App.java b/src/main/java/com/shockkid/App.java index b9c882f..6239d3d 100644 --- a/src/main/java/com/shockkid/App.java +++ b/src/main/java/com/shockkid/App.java @@ -2,12 +2,9 @@ package com.shockkid; /** * Hello world! - * */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); +public class App { + public static void main(String[] args) { + System.out.println("Hello World!"); } } diff --git a/src/test/java/com/shockkid/AppTest.java b/src/test/java/com/shockkid/AppTest.java index 77525fe..4988d47 100644 --- a/src/test/java/com/shockkid/AppTest.java +++ b/src/test/java/com/shockkid/AppTest.java @@ -7,14 +7,12 @@ import org.junit.Test; /** * Unit test for simple App. */ -public class AppTest -{ +public class AppTest { /** * Rigorous Test :-) */ @Test - public void shouldAnswerWithTrue() - { - assertTrue( true ); + public void shouldAnswerWithTrue() { + assertTrue(true); } }