Skip to content

Commit 3a852c8

Browse files
committed
add rpc
1 parent 6d921f5 commit 3a852c8

File tree

12 files changed

+284
-0
lines changed

12 files changed

+284
-0
lines changed

07rpc/rpc01/.DS_Store

6 KB
Binary file not shown.

07rpc/rpc01/pom.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.0.9.RELEASE</version>
9+
<!-- <relativePath/> &lt;!&ndash; lookup parent from repository &ndash;&gt;-->
10+
</parent>
11+
<groupId>io.kimmking</groupId>
12+
<artifactId>rpcfx</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>rpcfx</name>
15+
<packaging>pom</packaging>
16+
<description>RPC demo project for Spring Boot</description>
17+
18+
<modules>
19+
<module>rpcfx-api</module>
20+
<module>rpcfx-server</module>
21+
<module>rpcfx-client</module>
22+
</modules>
23+
24+
<properties>
25+
<java.version>1.8</java.version>
26+
</properties>
27+
28+
<dependencies>
29+
<dependency>
30+
<groupId>org.springframework.boot</groupId>
31+
<artifactId>spring-boot-starter</artifactId>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>org.springframework.boot</groupId>
36+
<artifactId>spring-boot-starter-web</artifactId>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.springframework.boot</groupId>
41+
<artifactId>spring-boot-starter-test</artifactId>
42+
<scope>test</scope>
43+
<exclusions>
44+
<exclusion>
45+
<groupId>org.junit.vintage</groupId>
46+
<artifactId>junit-vintage-engine</artifactId>
47+
</exclusion>
48+
</exclusions>
49+
</dependency>
50+
</dependencies>
51+
52+
</project>

07rpc/rpc01/rpcfx-api/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>io.kimmking</groupId>
7+
<artifactId>rpcfx</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<!-- <relativePath/> &lt;!&ndash; lookup parent from repository &ndash;&gt;-->
10+
</parent>
11+
<groupId>io.kimmking</groupId>
12+
<artifactId>rpcfx-api</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>rpcfx-api</name>
15+
16+
<properties>
17+
<java.version>1.8</java.version>
18+
</properties>
19+
20+
<build>
21+
<plugins>
22+
<plugin>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-maven-plugin</artifactId>
25+
</plugin>
26+
</plugins>
27+
</build>
28+
29+
</project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package io.kimmking.rpcfx.api;
2+
3+
public class User {
4+
5+
private int id;
6+
private String name;
7+
8+
public int getId() {
9+
return id;
10+
}
11+
12+
public void setId(int id) {
13+
this.id = id;
14+
}
15+
16+
public String getName() {
17+
return name;
18+
}
19+
20+
public void setName(String name) {
21+
this.name = name;
22+
}
23+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package io.kimmking.rpcfx.api;
2+
3+
public interface UserService {
4+
5+
User findById(int id);
6+
7+
}

07rpc/rpc01/rpcfx-client/pom.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>io.kimmking</groupId>
7+
<artifactId>rpcfx</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<!-- <relativePath/> &lt;!&ndash; lookup parent from repository &ndash;&gt;-->
10+
</parent>
11+
<groupId>io.kimmking</groupId>
12+
<artifactId>rpcfx-client</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>rpcfx-client</name>
15+
16+
<properties>
17+
<java.version>1.8</java.version>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>io.kimmking</groupId>
23+
<artifactId>rpcfx-api</artifactId>
24+
<version>${project.version}</version>
25+
</dependency>
26+
27+
<dependency>
28+
<groupId>org.springframework.boot</groupId>
29+
<artifactId>spring-boot-starter</artifactId>
30+
</dependency>
31+
32+
<dependency>
33+
<groupId>org.springframework.boot</groupId>
34+
<artifactId>spring-boot-starter-web</artifactId>
35+
</dependency>
36+
37+
<dependency>
38+
<groupId>org.springframework.boot</groupId>
39+
<artifactId>spring-boot-starter-test</artifactId>
40+
<scope>test</scope>
41+
<exclusions>
42+
<exclusion>
43+
<groupId>org.junit.vintage</groupId>
44+
<artifactId>junit-vintage-engine</artifactId>
45+
</exclusion>
46+
</exclusions>
47+
</dependency>
48+
</dependencies>
49+
50+
<build>
51+
<plugins>
52+
<plugin>
53+
<groupId>org.springframework.boot</groupId>
54+
<artifactId>spring-boot-maven-plugin</artifactId>
55+
</plugin>
56+
</plugins>
57+
</build>
58+
59+
</project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package io.kimmking.springboot01;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5+
import org.springframework.boot.autoconfigure.SpringBootApplication;
6+
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
7+
import org.springframework.jms.annotation.EnableJms;
8+
9+
@SpringBootApplication
10+
public class Springboot01Application {
11+
12+
public static void main(String[] args) {
13+
SpringApplication.run(Springboot01Application.class, args);
14+
}
15+
16+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server:
2+
port: 8080
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.kimmking.springboot01;
2+
3+
import org.junit.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
6+
@SpringBootTest
7+
class Springboot01ApplicationTests {
8+
9+
@Test
10+
void contextLoads() {
11+
}
12+
13+
}

07rpc/rpc01/rpcfx-server/pom.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>io.kimmking</groupId>
7+
<artifactId>rpcfx</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<!-- <relativePath/> &lt;!&ndash; lookup parent from repository &ndash;&gt;-->
10+
</parent>
11+
<groupId>io.kimmking</groupId>
12+
<artifactId>rpcfx-server</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>rpcfx-server</name>
15+
16+
<properties>
17+
<java.version>1.8</java.version>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>io.kimmking</groupId>
23+
<artifactId>rpcfx-api</artifactId>
24+
<version>${project.version}</version>
25+
</dependency>
26+
27+
<dependency>
28+
<groupId>org.springframework.boot</groupId>
29+
<artifactId>spring-boot-starter</artifactId>
30+
</dependency>
31+
32+
<dependency>
33+
<groupId>org.springframework.boot</groupId>
34+
<artifactId>spring-boot-starter-web</artifactId>
35+
</dependency>
36+
37+
<dependency>
38+
<groupId>org.springframework.boot</groupId>
39+
<artifactId>spring-boot-starter-test</artifactId>
40+
<scope>test</scope>
41+
<exclusions>
42+
<exclusion>
43+
<groupId>org.junit.vintage</groupId>
44+
<artifactId>junit-vintage-engine</artifactId>
45+
</exclusion>
46+
</exclusions>
47+
</dependency>
48+
</dependencies>
49+
50+
<build>
51+
<plugins>
52+
<plugin>
53+
<groupId>org.springframework.boot</groupId>
54+
<artifactId>spring-boot-maven-plugin</artifactId>
55+
</plugin>
56+
</plugins>
57+
</build>
58+
59+
</project>

0 commit comments

Comments
 (0)