💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
报错如下 ``` - Application run failed java.lang.ArrayIndexOutOfBoundsException: -1 at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:136) at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:1222) at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:308) at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:248) at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:634) at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:165) at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:59) at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:45) at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:140) at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:119) at org.yaml.snakeyaml.composer.Composer.composeScalarNode(Composer.java:214) at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:184) at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314) at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305) at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286) at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188) at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314) at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305) at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286) at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188) ``` 1. 正在使用的项目, 更新代码之后出现这个错误, 运行失败, 打包成功 代码正常, 是yml编码问题, 首先idea确认file ->settings ->file encodings 里的都是utf-8编码, 是gbk就改成utf-8 启动还是报错则: 把yml 执行编码转换 再不行就yml文件中随便改动, 如:回车换行, 加点改动, 再保存测试(这个方式要多试几次, 我这边是每个页面改了多处地方, 修改多次才行的) 再不行打开yml文件, 点击idea右下角的utf-8, 选择gbk, 点击convert, 点击右下角gbk, 选择utf-8, 点击convert 把所有的yml都这样转换一遍, 这边就运行成功了 ![](https://img.kancloud.cn/00/75/00750f499dc84366e3abc5110a50f7cb_657x289.png) ![](https://img.kancloud.cn/5f/7b/5f7b4a750255500e13e3e2953ffc5e63_605x179.png) 2. 经测试, 我这边是因为做测试的时候, 复制了一份数据库, 数据库名称再原来的基础上 加了数字1, 结果就是因为这个启动时 yml 报错了