去除模板字符串

This commit is contained in:
chuzhongzai 2024-01-30 19:30:44 +08:00
parent 2138f97bd7
commit 6e59741e70
2 changed files with 2 additions and 13 deletions

11
pom.xml
View File

@ -45,7 +45,7 @@
<imageName>SecretChat</imageName>
<quickBuild>true</quickBuild>
<buildArgs>
<arg>--gc=G1</arg>
<!-- <arg>&#45;&#45;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>

View File

@ -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 + "}");
}
}