修复截图无法查看问题和乱码问题

This commit is contained in:
392431041@qq.com 2020-04-07 21:42:48 +08:00
parent 9ade79cf2f
commit c9c0d3d26d
3 changed files with 31 additions and 2 deletions

28
pom.xml
View File

@ -314,6 +314,34 @@
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-sh</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>GBK</encoding>
<outputDirectory>${project.build.directory}
</outputDirectory>
<resources>
<resource>
<directory>src/main/Resources</directory>
<includes>
<include>**/*.bat</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -73,8 +73,7 @@ public class ServerHandler extends ChannelHandlerAdapter {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
//统一转编码
String msgstr = URLDecoder.decode(msg.toString(), "UTF-8");
JSONObject json = JSON.parseObject(msgstr);
JSONObject json = JSON.parseObject(msg.toString());
/*
* ClientUp客户端启动自动注册到服务端中
* */

View File

@ -0,0 +1,2 @@
chcp 65001
java -Dfile.encoding=utf-8 -jar LuckyFrameWeb.jar