在网页提交表单后,在数据库上面的中文乱码,如下图:
解决方法:
找到applicationContext.xml文件中的配置代码:
<property name="jdbcUrl">
<value>jdbc:mysql://123.207.221.208:3306/hzj</value>
</property>
把?characterEncoding=utf-8添加进去
<property name="jdbcUrl">
<value>jdbc:mysql://123.207.221.208:3306/hzj?characterEncoding=utf-8</value>
</property>