Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 无法使用中文用户名spring Mvc登录_Mysql_Spring_Spring Mvc_Login_Utf 8 - Fatal编程技术网

Mysql 无法使用中文用户名spring Mvc登录

Mysql 无法使用中文用户名spring Mvc登录,mysql,spring,spring-mvc,login,utf-8,Mysql,Spring,Spring Mvc,Login,Utf 8,我针对MySQL配置了SpringMVC应用程序的基本spring安全性。为了支持国际化,我在web.xml中使用UTF-8定义了org.springframework.web.filter.CharacterEncodingFilter,在tomcat server.xml中指定了UTF-8,并修改了MySQL表以支持UTF-8编码 登录页面的contentType=text/html;字符集=UTF-8页面编码=UTF-8。 我能够创建中文用户名并保存在MySQL中。当尝试使用中文用户名登录

我针对MySQL配置了SpringMVC应用程序的基本spring安全性。为了支持国际化,我在web.xml中使用UTF-8定义了org.springframework.web.filter.CharacterEncodingFilter,在tomcat server.xml中指定了UTF-8,并修改了MySQL表以支持UTF-8编码

登录页面的contentType=text/html;字符集=UTF-8页面编码=UTF-8。 我能够创建中文用户名并保存在MySQL中。当尝试使用中文用户名登录时,spring身份验证提供程序中的用户名不是UTF-8,因此获取用户名失败


如何解决此问题?

检查此资源包是否已正确拾取。我能在屏幕上显示汉字。唯一的问题是,我不能用中文用户名登录