在連接mysql數據庫時在連接字符串中進行設置如:
url="jdbc:mysql://localhost:3306/db_pos?useUnicode=true&characterEncoding=utf8"