IDEA中写MyBatis的xml配置文件编译报错的坑 说明:用IDEA编译工具在项目中使用Mybatis框架,编写mybatis-config.xml和Mapper.xml配置文件时,编译项目出现错误,错误提示为: xml中1字节的UTF-8序列的字节1无效 The cause of this is a file that is not UTF-8 is being parsed as UTF-8. It is likely that the parser is encountering a…
①创建数据库和表,数据库为mytest,表为users CREATE DATABASE mytest; USE mytest; DROP TABLE IF EXISTS users; CREATE TABLE users( id INT PRIMARY KEY auto_increment NOT NULL, name ), age INT ) ②创建Java工程,导入相应的jar包 ③创建配置文件conf.xml和数据库配置文件db.properties <?xml version="1…