才学JSP的时候也碰到Mysql乱码问题,按照Mysql设置成UTF-8 页面编码也是UTF-8,在URL连接加jdbc:mysql://localhost/hibernate_test?useUnicode=true;characterEncoding=UTF-8
都解决了。
现在才开始学Hibernate,Hibernate创建数据库的时候设置成UTF-8的了,发现不行,看到网上有说需要在hibernate.cfg.xml上加上<property name="hibernate.connection.url">jdbc:mysql://localhost/hibernate_test?useUnicode=true&amp;characterEncoding=UTF-8</property> 
这样加报错了(LOG4J提示的)难道一定要用过滤吗?