去除模板字符串
This commit is contained in:
parent
2138f97bd7
commit
6e59741e70
11
pom.xml
11
pom.xml
@ -45,7 +45,7 @@
|
||||
<imageName>SecretChat</imageName>
|
||||
<quickBuild>true</quickBuild>
|
||||
<buildArgs>
|
||||
<arg>--gc=G1</arg>
|
||||
<!-- <arg>--gc=G1</arg>-->
|
||||
<arg>-H:+ReportExceptionStackTraces</arg>
|
||||
</buildArgs>
|
||||
<metadataRepository>
|
||||
@ -53,15 +53,6 @@
|
||||
</metadataRepository>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>21</source>
|
||||
<target>21</target>
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
@ -2,8 +2,6 @@ package com.demo;
|
||||
|
||||
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
|
||||
|
||||
import static java.lang.StringTemplate.STR;
|
||||
|
||||
public class Message {
|
||||
//表示前端与后端建立连接并发送聊天id
|
||||
public static final int INIT = 1;
|
||||
@ -24,6 +22,6 @@ public class Message {
|
||||
public static final int CONTENT = 30;
|
||||
|
||||
public static TextWebSocketFrame pairDisconnected(){
|
||||
return new TextWebSocketFrame(STR."{\"type\":\{Message.DISCONNECT}}");
|
||||
return new TextWebSocketFrame("{\"type\":" + Message.DISCONNECT + "}");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user