1. Vue 错误 Uncaught TypeError: Object(…) is not a function at eval (vue-router.esm-bundler.js
-
vue-router版本太高了,需降低版本(降为 3.5.3)
- 可参考
2. Vue 错误 Module build failed Error Node Sass version 7.0.1 is incompatible with ^4.0.0.
-
Sass版本太高了,需降低版本(降为 4.0.0)
- 可参考
3. web项目运行后点击 登录,一直在转圈,查看状态为“挂起”,登录不成功,进去不首页。
- 解决:数据库配置文件中,把数据库的名字写错了,太大意了!
4. Maven里面所有依赖都爆红,侧边项目包中也一个jar包都没有了。
- 解决:点击下面带m的小图标,
输入:mvn dependency:sources
mvn -U idea:idea
二选一,执行命令,就可以重新下载依赖所需要的jar包。
参考自:链接
5. 运行500报错:nested exception is java.sql.SQLException: com.mysql.cj.jdbc.Driver] with ro
- 解决:开始以为是,jdbc的配置文件写错了,或者引用错了,找了好久,最好发现是mysql的引用报版本不对(复制过来的包一定要看看版本!)
6. vue遇到错误,点击按钮方法没出来
- 解决: 把 methods 写成了 method,methods,一定要加“s”。
7. 报错:Proxy error: Could not proxy request /api/user from localhost:9876 to http://localhost:9090.
- 解决:配置代理,在F12中的network查看,地址为:http://localhost:/api/api/user,连个api,代码中删掉一个就好了。
8. Field ‘id’ doesn’t have a default value
9. 修改vue路由之后,前端页面出不来了
- 解决:后来发现,配置路由的component:写成了小写的 layout,应该大写Layout
{
path: '/',
name: 'Layout',
component: Layout,
children: [
{
path: 'home',
name: 'Home',
component: () => import('../views/HomeView')
}
]
}
10. 后台警告:Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method ‘GET’ not supported]
前端报错:Status Code: 405 Method Not Allowed.errAxiosError: Request failed with status code 405
- 没有解决:有说将后端接口上的注解@GetMapping 换为 @RequestMapping,前端以post方式请求。但我的还是有问题,有报错但可以正常运行。。。
11. IllegalArgumentException: Could not resolve placeholder ‘server.port’ in val
- 解决:yml 配置要用冒号 “ : ” ,不能用点 “ . ”
// 在 .yml 配置文件里 yml 要用“:”!!
@Value("${server:port}")
private String port;
@Value("${file:ip}")
private String ip;```