在SFS配置文件中数据库配置中: <DatabaseManager active="true"> <Driver>com.mysql.jdbc.Driver</Driver> <ConnectionString> jdbc:mysql://localhost:3306/XXX?useUnicode=true&characterEncoding=UTF-8 </ConnectionString> <UserName>root</UserName> <Password></Password> <TestSQL><![CDATA[SELECT COUNT(*) FROM XXXDb]]></TestSQL> <MaxActive>10</MaxActive> <MaxIdle>10</MaxIdle> <OnExhaustedPool>fail</OnExhaustedPool> <BlockTime>5000</BlockTime> </DatabaseManager> 注意链接字符串: jdbc:mysql://localhost:3306/XXXX?useUnicode=true&characterEncoding=UTF-8