spring与数据库交互时乱码问题
在xml文件中添加:
jdbc:mysql://localhost/jdbctemplate?useUnicode=true&characterEncoding=UTF8
在普通类添加:
jdbc:mysql://localhost/jdbctemplate?useUnicode=true&characterEncoding=UTF8
下表为 XML 标记使用的字符列出了五种内置实体zhidao。
写出优雅代码
在xml文件中添加:
jdbc:mysql://localhost/jdbctemplate?useUnicode=true&characterEncoding=UTF8
在普通类添加:
jdbc:mysql://localhost/jdbctemplate?useUnicode=true&characterEncoding=UTF8
下表为 XML 标记使用的字符列出了五种内置实体zhidao。