当前位置:Gxlcms > 数据库问题 > play framework mysql统一utf8

play framework mysql统一utf8

时间:2021-07-01 10:21:17 帮助过:2人阅读

tabasename` CHARACTER SET ‘utf8‘ COLLATE ‘utf8_general_ci‘;

3.创建表也utf8

CREATE TABLE IF NOT EXISTS suploadfileinfo (
id INT auto_increment primary key not null,
filename VARCHAR(255),
filesize    VARCHAR(255),
time TIMESTAMP DEFAULT now()
)
ENGINE=InnoDB   DEFAULT   CHARSET=utf8;
4. play framework连接mysql时也utf8. conf/application.conf
db.default.driver= com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost/machinelearning?useUnicode=true&characterEncoding=UTF-8"
db.default.username=root
db.default.password=""






play framework mysql统一utf8

标签:

人气教程排行