zoukankan      html  css  js  c++  java
  • spring boot 配置启动后执行sql, 中文乱码

    spring.datasource.schema指定启动后执行的sql文件位置。

    我发现中文乱码,原因是没有指定执行sql script encoding:

    spring:
    datasource:
    url: "jdbc:h2:mem:test"
    username: "sa"
    password: ""
    schema: database/import.sql
    sql-script-encoding: utf-8
    type: com.alibaba.druid.pool.DruidDataSource
    driver-class-name: org.h2.Driver
    maxActive: 20
    initialSize: 1
    maxWait: 60000
    minIdle: 1
    timeBetweenEvictionRunsMillis: 60000
    minEvictableIdleTimeMillis: 300000
    validationQuery: select 1
    testWhileIdle: true
    testOnBorrow: false
    testOnReturn: false
    poolPreparedStatements: true
    maxOpenPreparedStatements: 20
    maxPoolPreparedStatementPerConnectionSize: 20
    filters: stat
    So do it,and change it,no regret!
    http://www.cnblogs.com/woshimrf/p/5625474.html
  • 相关阅读:
    Nginx开启Gzip压缩
    VMware克隆虚拟机,克隆机网卡启动不了解决方案
    Linux 几个简单的操作命令
    1. Java环境搭建及demo
    美柚记录
    action找不到
    < >
    document 写法
    develop process
    git stash
  • 原文地址:https://www.cnblogs.com/softidea/p/5759354.html
Copyright © 2011-2022 走看看