在分表后mybatis-plus删除操作失效等问题处理
mybatis-plus
旧系统重构遇到的种种问题
在这三篇文章中,我花了近1个月时间重构了28个微服务,当中遇到的一些问题,但是发布到pretest环境,却还有启动问题,看来系统重构不是那么简单。
2 java.nio.charset.MalformedInputException: Input length = 1
原因为下图,解决方案有两个
一、启动命令采用java -jar -Dfile.encoding=utf-8 acc-transfer-server.jar
二、就是将下图中project encoding改成utf-8
cloud-context-3.1.6.jar!/:3.1.6]at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:604) [spring-boot-2.7.9.jar!/:2.7.9]at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:373) [spring-boot-2.7.9.jar!/:2.7.9]at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) [spring-boot-2.7.9.jar!/:2.7.9]at com.whty.acc.transfer.server.TransferServerApplication.main(TransferServerApplication.java:23) [classes!/:2.0.0]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_211]at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_211]at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_211]at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_211]at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [acc-transfer-server.jar:2.0.0]at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) [acc-transfer-server.jar:2.0.0]at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [acc-transfer-server.jar:2.0.0]at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) [acc-transfer-server.jar:2.0.0]
Caused by: java.nio.charset.MalformedInputException: Input length = 1at java.nio.charset.CoderResult.throwException(Unknown Source) ~[na:1.8.0_211]at sun.nio.cs.StreamDecoder.implRead(Unknown Source) ~[na:1.8.0_211]at sun.nio.cs.StreamDecoder.read(Unknown Source) ~[na:1.8.0_211]at java.io.InputStreamReader.read(Unknown Source) ~[na:1.8.0_211]at org.yaml.snakeyaml.reader.UnicodeReader.read(UnicodeReader.java:125) ~[snakeyaml-1.30.jar!/:na]at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:183) ~[snakeyaml-1.30.jar!/:na]... 38 common frames omitted
1 org.springframework.beans.factory.UnsatisfiedDependencyException
在windows还原同样的环境,也是这样的错误
就其原因是因为
翻看历史记录,mybatis没有这个配置,因为mybatis通过方式来实现。