记住,每次修改了配置之后都 clean 一下,把 target 删除

第一种解决方案

去掉 pom.xml 中的 properties

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>

或者在 pom.xml 中加入

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

记住每次修改配置都把 target 删除, 重新 build

第二种解决方案

打开设置 settings > Editor > File Encodings 找到 Project Encoding:

把 Project Encoding: 设置为 UTF-8

MalformedByteSequenceException: 1字节的 UTF-8 序列的字节 1 无效的更多相关文章

  1. com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document fro ...

  2. com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 x 无效

    在启动Tomcat项目时,控制台报错:nested exception is com.sun.org.apache.xerces.internal.impl.io.MalformedByteSeque ...

  3. Activiti:MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

    在win下开发,有时编译或运行项目会报3字节的UTF-8序列的字节3无效. 解决该问题的办法 1.将xml头文件改为GBK编码方式 ,我这里不OK <?xml version="1.0 ...

  4. tomcat 1字节的UTF-8序列的字节1无效

    微信支付时, 命名返回支付成功, 但是成功后却返回如下的错误, 在测试环境都是没有任何问题, 到客户现场后, 可能客户现场使用的4G网络, 用微信支付时一直报这样的错误 错误现象: com.sun.o ...

  5. 报错:3 字节的 UTF-8 序列的字节 3 无效。

    错误如下: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with n ...

  6. 异常: 2 字节的 UTF-8 序列的字节 2 无效。

    具体异常: 十二月 08, 2015 7:16:55 下午 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.servi ...

  7. java.lang.RuntimeException: org.dom4j.DocumentException: 1 字节的 UTF-8 序列的字节 1 无效。

    向一个XML文件写入出现异常 解决办法:使用记事本打开该XML文件,另存为,编码选择UTF-8 java.lang.RuntimeException: org.dom4j.DocumentExcept ...

  8. 出现 关于UTF-8 序列的字节 2 无效的异常

    学习mybatis中碰到了 Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instanc ...

  9. XML文件存在中文注释报错问题( 3 字节的 UTF-8 序列的字节 3 无效)

    今天在做mybatis项目的时候,给映射文件添加了中文注释后,程序就报错.把中文注释删除后,程序又可以正常执行.解决方法在下文提到. 我的xml映射文件如下: <?xml version=&qu ...

  10. Error building SqlSession. ### The error may exist in dao/UserMapper.xml ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration(2 字节的 UTF-8 序列的字节 2 无效。)

    关于在学习Mybatis框架时运行报错 Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error building ...

随机推荐

  1. Css:常用的去除默认样式

    *{   padding: 0;   margin: 0; } ul,ol{   list-style: none; } a,a:hover,a:link,a:visited,a:active{    ...

  2. Jmeter(1)下载和安装

    一.Jmeter工具安装 1.jmeter安装包下载地址:http://jmeter.apache.org/,下载Binaries包,使用jmeter需要先安装jdk 2.解压后打开/bin目录下的j ...

  3. jwt 简单基本使用加密解密

    import jwt # 加密 encode_jwt=jwt.encode({'uid':'123'},'密钥123',algorithm='HS256') print(encode_jwt) # 解 ...

  4. mysql主从双机keepalived配置

    1.关闭selinux SELINUX=disabled 2.yum安装keepalived yum install -y keepalived 3.修改配置文件 主库配置文件: ! Configur ...

  5. Kafka消费者手动提交消息偏移

    生产者每次调用poll()方法时,它总是返回由生产者写入Kafka但还没有消费的消息,如果消费者一致处于运行状态,那么分区消息偏移量就没什么用处,但是如果消费者发生崩溃或者有新的消费者加入群组,就会触 ...

  6. [日常摸鱼]HDU3007Buried memory-最小圆覆盖

    最小圆覆盖裸题 我求外接圆的方法比较奇怪-不过还是过掉了 #include<cstdio> #include<cmath> #include<cstdlib> #i ...

  7. ceph如何快速卸载所有osd及擦除磁盘分区表和内容并重新加入

    我的ceph集群中有4台服务器,16个osd,因为某些原因,集群中的数据都不要了,但是集群要保留给新的应用使用,集群现有的osd情况如下 [root@ceph-host-01 ~]# cat /etc ...

  8. C# Wpf 后台代码设定UIElement的Canvas位置属性值

    后台in-code设定元件UIElement的Canvas位置属性的两种方法: 1.UIElement.SetValue()方法 uiElement.SetValue(Canvas.TopProper ...

  9. K-NN(最近邻分类算法 python

    # algorithm:K-NN(最近邻分类算法)# author:Kermit.L# time: 2016-8-7 #======================================== ...

  10. C#读取DLL文件获取所有类

    说明 调用Web.dll 文件,获取其中的所有的WebService 参考 https://blog.csdn.net/huoliya12/article/details/78873123 流程 使用 ...