当使用korma内置的mysql方法时,无法添加utf-8的支持。解决的方法就是重写mysql方法,代码如下:

(defn mysql
"改编自korma,添加了utf-8的支持"
[{:keys [host port db make-pool?]
:or {host "localhost", port 3306, db "", make-pool? true}
:as opts}]
(merge {:classname "com.mysql.jdbc.Driver" ; must be in classpath
:subprotocol "mysql"
:subname (str "//" host ":" port "/" db "?useUnicode=true&characterEncoding=UTF-8")
:delimiters "`"
:make-pool? make-pool?}
opts))

最新文章

  1. SQL SERVER 多数据导入
  2. .NET导入导出Excel方法总结
  3. Matlab中给figure添加图例(legend),标题(title)和颜色(color)
  4. mobile cpu上禁用alpha test的相关总结
  5. 图片lightbox2
  6. PHP通过字符串调用函数
  7. 360网站卫士推出google字体加速方案
  8. 第三百二十七天 how can I 坚持
  9. 关于oozie
  10. spring aop原理分析
  11. bootstrap基础样式使用
  12. assign retain copy
  13. WebViewJavascriptBridge详细使用
  14. git分支综述
  15. MySQL索引背后的之使用策略及优化(高性能索引策略)
  16. Mysql的JDBC
  17. 单表ORM框架
  18. linux:你不知道的echo
  19. shell date命令
  20. vue+vue-cli+淘宝lib-flexible做移动端自适应

热门文章

  1. [Apple开发者帐户帮助]六、配置应用服务(5.2)推送通知(APN):使用TLS证书与APN通信
  2. HTTP Status 500 - Could not write content: could not initialize proxy - no Session
  3. Winform中Treeview控件失去焦点,将选择的节点设置为高亮显示 (2012-07-16 13:47:07)转载▼
  4. 6.10---springboot的配置
  5. C语言常量
  6. [Android]异常5-throwable:java.lang.OutOfMemoryError: pthread_create
  7. 影响ERP成功实施的因素及实施方法
  8. 使用doxmate生成文档
  9. 显示log里的ansi codecs颜色字符
  10. C#鸡翁百鸡