问题汇总
请求访问url:Initializing Spring DispatcherServlet 'dispatcherServlet'
Initializing Servlet 'dispatcherServlet'
Completed initialization in 2 ms
解决:
1 2 | # 初始化dispatcherServlet,默认- 1 未开启, 0 及以上为开启 spring.mvc.servlet.load-on-startup= 1 |
页面报错:net::ERR_ABORTED 404 (Not Found)
解决:资源路径修改为../js
java -jar报错:Could not find or load main class
解决: 需要在pom文件中使用相应的springboot maven 打包插件,并且指定相应的启动类,即mainClass
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <mainClass>com.example.DemoApplication</mainClass> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build> |
问题:Input byte array has wrong 4-byte ending unit 。
解决:字符串变少了或者变多了就会出现这个原因
问题: Last unit does not have enough valid bits
解决:编码后的字符串长度不符合要求(要求长度是4的倍数)。字符串传参时丢失特殊字符(如 “+”、“#” 等)导致位数不足24位
问题: input byte array has incorrect ending byte at xxx
解决:输入字节数组在xxx处有不正确的结束字节
问题:Vue 安装 Element UI时报错 code ERESOLVE unable to resolve dependency tree
解决:一定注意,Vue3不能引入Element UI,它是和Element Plus配合使用的
1 | $ npm i element-ui -S --legacy-peer-deps |
问题:Vue项目报错: Component name “xxx“ should always be multi-word
解决:在vue.config.js配置中添加规则lintOnSave:false
1 2 3 4 5 | const { defineConfig } = require( '@vue/cli-service' ) module.exports = defineConfig({ transpileDependencies: true , lintOnSave: false }) |
问题:vue项目引入背景图片报错Cannot resolve directory ‘assets‘
解决:vue 2.6会出现这个问题,之前的版本都没有这个问题,这和webpack配置相关
将background: url("../assets/bg.jpg");
改为 background: url("~@/assets/bg.jpg");
1 2 3 4 5 | 1 . "./assets/bg.jpg" : 表示相对路径 2 . "assets/bg.jpg" : 被webpack解析为相对路径 3 . "~@/assets/bg.jpg" : 被webpack解析为 require(src/assets/bg.jpg) 动态引入 @在webpack 被resolve.alias配置下等价于/src 4 . "/assets/logo_blue.png" : webpack不解析 |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【.NET】调用本地 Deepseek 模型
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· DeepSeek “源神”启动!「GitHub 热点速览」
· 上周热点回顾(2.17-2.23)