开发程序电脑上运行都是正常的不乱码, 部署到其他电脑上就是乱码
一:输入的日志如下:
[DEBUG] 2019-10-31 10:42:47,020 cn.wizzer.common.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) - [POST]URI=/platform/login/doLogin 449ms
[DEBUG] 2019-10-31 10:42:47,041 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - INSERT INTO sys_log(nickname,type,tag,src,ip,msg,opBy,opAt,delFlag) VALUES(?,?,?,?,?,?,?,?,?)
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|-------|------|------|-----------------------------------------------------------------------|-----------|---------|----------------------------------|------------|------|
| 瓒呯骇绠$悊鍛?| info | 鐢ㄦ埛鐧婚檰 | cn.wizzer.modules.controllers.platform.sys.SysLoginController#doLogin | 127.0.0.1 | 鎴愬姛鐧诲綍绯荤粺锛?| cd6dc654f6c548829bf071a6afc71c2b | 1572489767 | NULL |
For example:> "INSERT INTO sys_log(nickname,type,tag,src,ip,msg,opBy,opAt,delFlag) VALUES('瓒呯骇绠$悊鍛?,'info','鐢 ㄦ埛鐧婚檰','cn.wizzer.modules.controllers.platform.sys.SysLoginController#doLogin','127.0.0.1','鎴愬姛鐧诲綍绯荤粺锛?,'cd6dc654f6c548829bf071a6afc71c2b',1572489767,'NULL') "
"
二: nutz输出的默认编码已经是utf-8
[INFO ] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:55) - Nutz Version : 1.r.61-SNAPSHOT
[INFO ] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:56) - Nutz.Mvc[nutz] is initializing ...
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:60) - Web Container Information:
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:61) - - Default Charset : UTF-8
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:62) - - Current . path : D:\Tomcat9.
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:63) - - Java Version : 1.8.0_161
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:64) - - File separator : \
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:65) - - Timezone : Asia/Shanghai
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:66) - - OS : Windows 10 amd64
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:67) - - ServerInfo : Apache Tomcat/9.0.14
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:68) - - Servlet API : 4.0
[DEBUG] 2019-10-31 10:42:31,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:73) - - ContextPath :
三:WhaleFilter 已经添加
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
MobileHealth
org.apache.shiro.web.env.EnvironmentLoaderListener
org.nutz.mvc.WhaleFilter
whale
config
enc.input=utf-8
enc.output=utf-8
whale
/*
ShiroFilter