Skip to content

Commit 8cfda6b

Browse files
author
shiyu rao
committed
init web user eureka message module
1 parent 43fae83 commit 8cfda6b

File tree

56 files changed

+1045
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1045
-438
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
# coderiver_platform
2-
CodeRiver Backend Platform (JAVA)
3-
4-
CodeRiver Java后端项目框架
5-
6-
//TODO to fill the module descriptions
1+
# codeforum

coderiver_qa/pom.xml renamed to codeforum_common/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<parent>
6-
<artifactId>coderiver_platform</artifactId>
6+
<artifactId>codeforum</artifactId>
77
<groupId>com.coderiver</groupId>
88
<version>1.0-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

12-
<artifactId>coderiver_qa</artifactId>
12+
<artifactId>codeforum_common</artifactId>
1313

1414

1515
</project>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.coderiver.codeforum.common.entity;
2+
3+
import java.io.Serializable;
4+
5+
/**
6+
* Created by Shiyu Rao on 08/03/2019.
7+
*/
8+
public class Message<T> implements Serializable {
9+
private Integer type;
10+
private T t;
11+
12+
public Message() {
13+
}
14+
15+
public Message(Integer type, T t) {
16+
this.type = type;
17+
this.t = t;
18+
}
19+
20+
@Override
21+
public String toString() {
22+
return "Message{" +
23+
"type=" + type +
24+
", t=" + t +
25+
'}';
26+
}
27+
28+
public Integer getType() {
29+
return type;
30+
}
31+
32+
public void setType(Integer type) {
33+
this.type = type;
34+
}
35+
36+
public T getT() {
37+
return t;
38+
}
39+
40+
public void setT(T t) {
41+
this.t = t;
42+
}
43+
}

coderiver_common/src/main/java/com/coderiver/common/entity/PageResult.java renamed to codeforum_common/src/main/java/com/coderiver/codeforum/common/entity/PageResult.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package com.coderiver.common.entity;
1+
package com.coderiver.codeforum.common.entity;
22

33
import java.util.List;
44

55
/**
6-
* Created by Ultratendency on 2019/1/2.
6+
* Created by Shiyu Rao on 2019/1/2.
77
* 用于统一返回分页数据
88
*/
99
public class PageResult<T> {

coderiver_common/src/main/java/com/coderiver/common/entity/Result.java renamed to codeforum_common/src/main/java/com/coderiver/codeforum/common/entity/Result.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.coderiver.common.entity;
1+
package com.coderiver.codeforum.common.entity;
22

33
/**
4-
* Created by Ultratendency on 2019/1/2.
4+
* Created by Shiyu Rao on 2019/1/2.
55
* 用于统一返回值
66
*/
77
public class Result {

coderiver_common/src/main/java/com/coderiver/common/entity/StatusCode.java renamed to codeforum_common/src/main/java/com/coderiver/codeforum/common/entity/StatusCode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.coderiver.common.entity;
1+
package com.coderiver.codeforum.common.entity;
22

33
/**
4-
* Created by Ultratendency on 2019/1/2.
4+
* Created by Shiyu Rao on 2019/1/2.
55
* 统一管理状态码
66
*/
77
public class StatusCode {

coderiver_common/src/main/java/com/coderiver/common/util/IdGenerator.java renamed to codeforum_common/src/main/java/com/coderiver/codeforum/common/util/IdGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.coderiver.common.util;
1+
package com.coderiver.codeforum.common.util;
22

33
import java.lang.management.ManagementFactory;
44
import java.net.InetAddress;

coderiver_eureka/pom.xml renamed to codeforum_eureka/pom.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<parent>
6-
<artifactId>coderiver_platform</artifactId>
6+
<artifactId>codeforum</artifactId>
77
<groupId>com.coderiver</groupId>
88
<version>1.0-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

12-
<artifactId>coderiver_eureka</artifactId>
13-
12+
<artifactId>codeforum_eureka</artifactId>
1413

14+
<dependencies>
15+
<dependency>
16+
<groupId>org.springframework.cloud</groupId>
17+
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
18+
</dependency>
19+
</dependencies>
1520
</project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.coderiver.codeforum.eureka;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
6+
7+
/**
8+
* Created by Shiyu Rao on 08/03/2019.
9+
*/
10+
@SpringBootApplication
11+
@EnableEurekaServer
12+
public class EurekaServer {
13+
public static void main(String[] args) {
14+
SpringApplication.run(EurekaServer.class, args);
15+
}
16+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
server:
2+
port: 6868
3+
eureka:
4+
client:
5+
register-with-eureka: false
6+
fetch-registry: false
7+
service-url:
8+
defaultZone: http://localhost:${server.port}/eureka/

0 commit comments

Comments
 (0)