1. 程式人生 > >mybatis欄位裡面含有表情時存入資料庫報錯

mybatis欄位裡面含有表情時存入資料庫報錯

配置檔案:

spring.datasource.type=org.apache.commons.dbcp2.BasicDataSource
spring.datasource.dbcp2.connection-init-sqls=SET NAMES utf8mb4

pom

<dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-dbcp2</artifactId>
            <version>2.1.1</version>
            <scope>runtime</scope>
        </dependency>