一、该问题的重现步骤是什么?
1. boot程序打包jar文件,java -jar .\SpringBlade.jar
2. 接收数据内容
{
"geoip" => {
"coordinates" => [
[0] "%{[geoip][longitude]}",
[1] "%{[geoip][latitude]}"
]
},
"path" => "C:/Users/kane/Desktop/test.txt",
"host" => "kane",
"username" => "用户测试",
"dstport" => "8080",
"message" => "<7>[access resource][TCP]用户测试 from IP 16.52.161.178: access 1.18.39.76:8080 success!\r",
"type" => "txt",
"@timestamp" => 2021-01-13T02:55:57.829Z,
"operatortype" => "TCP",
"loginregion" => {
"latitude" => 37.751,
"country_name" => "United States",
"country_code3" => "US",
"continent_code" => "NA",
"longitude" => -97.822,
"ip" => "16.52.161.178",
"country_code2" => "US",
"location" => {
"lon" => -97.822,
"lat" => 37.751
},
"timezone" => "America/Chicago"
},
"messagetype" => "7",
"dstip" => "1.18.39.76",
"res" => "success!\r",
"@version" => "1",
"srcip" => "16.52.161.178",
"protocol" => "access resource"
}
3.接口接收内容
@RestController/**
@AllArgsConstructor
@RequestMapping("app")
JSONObject jsonObject = JSON.parseObject(jsonString);
4、使用idea启动调试正常,
5、pom中build代码如下
二、你期待的结果是什么?实际看到的又是什么?
jsonobject 对象中 username 期待为中文
实际看到jasonobject为乱码
idea运行,调试正常
2021-01-13 10:55:58.014 DEBUG 62684 --- [ XNIO-1 task-3] o.s.baselog.mapper.TcpMapper.selectOne : ==> Preparing: SELECT id, user_name, dst_ip, src_ip, count, data, count_time, category, content FROM vpn_tcp WHERE user_name = ? AND dst_ip = ? AND src_ip = ? AND data = ?
2021-01-13 10:55:58.020 DEBUG 62684 --- [ XNIO-1 task-3] o.s.baselog.mapper.TcpMapper.selectOne : ==> Parameters: 用户测试(String), 1.18.39.76(String), 16.52.161.178(String), 2021-01-13(Date)
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
boot版本,在linux和windows都进行过测试,问题相同
四、请提供详细的错误堆栈信息,这很重要。
无堆栈错误信息。yml文件
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端