Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add chatRoom src code, update readme
  • Loading branch information
yennanliu committed Nov 4, 2023
commit b66a0ae714b7e50390abde777a50485594315543
33 changes: 33 additions & 0 deletions springChatRoom/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
20 changes: 1 addition & 19 deletions springChatRoom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,4 @@
- geo location app
- stock market app
- co-editing system (e.g. google doc ?)
- app needs near real-time update/sync, data transmit is not small

## Ref
- Article
- https://ithelp.ithome.com.tw/articles/10197142
- https://ithelp.ithome.com.tw/articles/10197191
- https://www.baeldung.com/websockets-spring
- https://blog.csdn.net/wwd0501/article/details/54582912
- https://www.slideshare.net/wenhsiaoyi/java-api-for-websocket
- https://www.syscom.com.tw/ePaper_New_Content.aspx?id=368&EPID=194&TableName=sgEPArticle
- https://tw511.com/a/01/16646.html
- Code
- https://spring.io/guides/gs/messaging-stomp-websocket/
- https://morosedog.gitlab.io/springboot-20190416-springboot28/

- Video
- https://youtu.be/r4fdPmZuzmY?si=qrmRTm09Bo53Ina1
- https://youtu.be/RbCFeeePJoM?si=DF6mES5XApvSkhXw
- https://youtu.be/es_fTKyfI4w?si=vVhEz6Us-zrcerTR
- app needs near real-time update/sync, data transmit is not small
20 changes: 20 additions & 0 deletions springChatRoom/doc/ref.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Ref
- Article
- https://blog.csdn.net/qqxx6661/article/details/98883166
- https://github.com/yennanliu/springboot-websocket-demo

- https://ithelp.ithome.com.tw/articles/10197142
- https://ithelp.ithome.com.tw/articles/10197191
- https://www.baeldung.com/websockets-spring
- https://blog.csdn.net/wwd0501/article/details/54582912
- https://www.slideshare.net/wenhsiaoyi/java-api-for-websocket
- https://www.syscom.com.tw/ePaper_New_Content.aspx?id=368&EPID=194&TableName=sgEPArticle
- https://tw511.com/a/01/16646.html
- Code
- https://spring.io/guides/gs/messaging-stomp-websocket/
- https://morosedog.gitlab.io/springboot-20190416-springboot28/

- Video
- https://youtu.be/r4fdPmZuzmY?si=qrmRTm09Bo53Ina1
- https://youtu.be/RbCFeeePJoM?si=DF6mES5XApvSkhXw
- https://youtu.be/es_fTKyfI4w?si=vVhEz6Us-zrcerTR
65 changes: 65 additions & 0 deletions springChatRoom/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.12</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>com.yen</groupId>
<artifactId>springChatRoom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>springChatRoom</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>11</java.version>
</properties>

<dependencies>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- &lt;!&ndash; redis &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-data-redis</artifactId>-->
<!-- </dependency>-->

<!-- json -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.79</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.yen.springChatRoom;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SpringChatRoomApplication {

public static void main(String[] args) {

SpringApplication.run(SpringChatRoomApplication.class, args);
}

}
1 change: 1 addition & 0 deletions springChatRoom/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.yen.springChatRoom;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class SpringChatRoomApplicationTests {

@Test
void contextLoads() {
}

}