Added enums and infrastructure for different types of ws messages
built newest epq-web application bundle to static
This commit is contained in:
parent
621826ef46
commit
77366f30cc
15 changed files with 39 additions and 17 deletions
4
src/main/java/me/imsonmia/epqapi/config/SqlConfig.java
Normal file
4
src/main/java/me/imsonmia/epqapi/config/SqlConfig.java
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
package me.imsonmia.epqapi.config;
|
||||||
|
|
||||||
|
public interface SqlConfig {
|
||||||
|
}
|
|
@ -17,5 +17,6 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||||
@Override
|
@Override
|
||||||
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
||||||
registry.addEndpoint("/ws").setAllowedOrigins("*");
|
registry.addEndpoint("/ws").setAllowedOrigins("*");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ public class Message {
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
@Id
|
@Id
|
||||||
Long id;
|
Long id;
|
||||||
|
MessageType type;
|
||||||
String fromUserId;
|
String fromUserId;
|
||||||
String toUserId;
|
String toUserId;
|
||||||
String content;
|
String content;
|
||||||
|
@ -20,6 +21,9 @@ public class Message {
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
public MessageType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
public String getFromUserId() {
|
public String getFromUserId() {
|
||||||
return fromUserId;
|
return fromUserId;
|
||||||
}
|
}
|
||||||
|
@ -44,15 +48,20 @@ public class Message {
|
||||||
public void setTimeMillis(Long timeMillis) {
|
public void setTimeMillis(Long timeMillis) {
|
||||||
this.timeMillis = timeMillis;
|
this.timeMillis = timeMillis;
|
||||||
}
|
}
|
||||||
|
public void setType(MessageType type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
public Message() {
|
public Message() {
|
||||||
|
|
||||||
}
|
}
|
||||||
public Message(Long id,
|
public Message(Long id,
|
||||||
|
MessageType type,
|
||||||
String fromUserId,
|
String fromUserId,
|
||||||
String toUserId,
|
String toUserId,
|
||||||
String content,
|
String content,
|
||||||
Long timeMillis) {
|
Long timeMillis) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
this.type = type;
|
||||||
this.fromUserId = fromUserId;
|
this.fromUserId = fromUserId;
|
||||||
this.toUserId = toUserId;
|
this.toUserId = toUserId;
|
||||||
this.content = content;
|
this.content = content;
|
||||||
|
|
8
src/main/java/me/imsonmia/epqapi/model/MessageType.java
Normal file
8
src/main/java/me/imsonmia/epqapi/model/MessageType.java
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
package me.imsonmia.epqapi.model;
|
||||||
|
|
||||||
|
public enum MessageType {
|
||||||
|
MESSAGE,
|
||||||
|
SYSTEM,
|
||||||
|
HELLO,
|
||||||
|
DATA,
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
spring.datasource.url=jdbc:mariadb://127.0.0.1:3306/test
|
spring.datasource.url=jdbc:mariadb://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8
|
||||||
spring.datasource.username=dbuser
|
spring.datasource.username=dbuser
|
||||||
spring.datasource.password=dbpasswd
|
spring.datasource.password=dbpasswd
|
||||||
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
||||||
spring.jpa.show-sql: false
|
spring.jpa.show-sql: true
|
||||||
spring.jpa.hibernate.ddl-auto=create-drop
|
spring.jpa.hibernate.ddl-auto=create-drop
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"files": {
|
"files": {
|
||||||
"main.css": "/static/css/main.e6c13ad2.css",
|
"main.css": "/static/css/main.7bfab64e.css",
|
||||||
"main.js": "/static/js/main.a029d655.js",
|
"main.js": "/static/js/main.837b405a.js",
|
||||||
"index.html": "/index.html",
|
"index.html": "/index.html",
|
||||||
"main.e6c13ad2.css.map": "/static/css/main.e6c13ad2.css.map",
|
"main.7bfab64e.css.map": "/static/css/main.7bfab64e.css.map",
|
||||||
"main.a029d655.js.map": "/static/js/main.a029d655.js.map"
|
"main.837b405a.js.map": "/static/js/main.837b405a.js.map"
|
||||||
},
|
},
|
||||||
"entrypoints": [
|
"entrypoints": [
|
||||||
"static/css/main.e6c13ad2.css",
|
"static/css/main.7bfab64e.css",
|
||||||
"static/js/main.a029d655.js"
|
"static/js/main.837b405a.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>IRC application instance</title><script defer="defer" src="/static/js/main.a029d655.js"></script><link href="/static/css/main.e6c13ad2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div id="copyright"><pre>Copyright 2024-2025 Zhongheng Liu @ Byron College</pre></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>IRC application instance</title><script defer="defer" src="/static/js/main.837b405a.js"></script><link href="/static/css/main.7bfab64e.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div id="copyright"><pre>Copyright 2024-2025 Zhongheng Liu @ Byron College</pre></div></body></html>
|
2
src/main/resources/static/static/css/main.7bfab64e.css
Normal file
2
src/main/resources/static/static/css/main.7bfab64e.css
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.chat-inner-wrapper{display:flex;flex-direction:column-reverse;height:500px;overflow-wrap:normal;overflow-y:auto}.entry-box{margin-top:5px}.chat{min-height:80vh;position:relative}body{background-color:#000;color:#0f3}.App{margin:3%;min-height:100vh}
|
||||||
|
/*# sourceMappingURL=main.7bfab64e.css.map*/
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"static/css/main.7bfab64e.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF,CCZA,oBAII,YAAa,CACb,6BAA8B,CAJ9B,YAAa,CAEb,oBAAqB,CADrB,eAKJ,CACA,WACI,cACJ,CACA,MACI,eAAgB,CAChB,iBACJ,CCdA,KACE,qBAAuB,CACvB,UACF,CACA,KACE,SAAU,CACV,gBACF","sources":["index.css","Chat/Chat.css","App.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n",".chat-inner-wrapper {\n height: 500px;\n overflow-y: auto;\n overflow-wrap: normal;\n display: flex;\n flex-direction: column-reverse;\n\n}\n.entry-box {\n margin-top: 5px;\n}\n.chat {\n min-height: 80vh;\n position: relative;\n}","body {\n background-color: black;\n color: #00FF33;\n}\n.App {\n margin: 3%;\n min-height: 100vh;\n}"],"names":[],"sourceRoot":""}
|
|
@ -1,2 +0,0 @@
|
||||||
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}
|
|
||||||
/*# sourceMappingURL=main.e6c13ad2.css.map*/
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"static/css/main.e6c13ad2.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF","sources":["index.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n"],"names":[],"sourceRoot":""}
|
|
File diff suppressed because one or more lines are too long
1
src/main/resources/static/static/js/main.837b405a.js.map
Normal file
1
src/main/resources/static/static/js/main.837b405a.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue