当前位置:网站首页>项目中遇到的问题及解决
项目中遇到的问题及解决
2022-07-23 14:20:00 【joy妹妹是菜鸟】
问题一
报错:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.lanou.mapper.GoodsMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {
@org.springframework.beans.factory.annotation.Autowired(required=true)}
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.lanou.mapper.GoodsMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {
@org.springframework.beans.factory.annotation.Autowired(required=true)}
**原因:**没导入mapper.xml
问题二
**报错:**404进入方法失败
**原因:**在Controller中没有注解@ResponseBody
问题三
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-dNcFy2ll-1658541859925)(C:\Users\pon18\AppData\Roaming\Typora\typora-user-images\image-20220722162034643.png)]](/img/20/5cb9eda315f97f89ef5c70c1b377d6.png)
使用jackson传数据到浏览器过程中遇到406,浏览器看不懂你传送的数据(List对象)
查看问题发现是没有开启mvc的注解驱动
在spring中配置即可
<mvc:annotation-driven></mvc:annotation-driven>-->
问题四
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-OVHHIawb-1658541859926)(C:\Users\pon18\AppData\Roaming\Typora\typora-user-images\image-20220722162016972.png)]](/img/a5/12d1e42be9eee427646d2daa98b03e.png)
报错信息:Uncaught ReferenceError: $ is not defined
原因是我写的:
<script src="js.jquery.js"></script>
正确应该是:
<script src="js/jquery.js"></script>
问题五
在浏览器执行查询操作的时候,在地址栏输入username和password之后始终得不到正确的结果。User的属性名是userName,在输入栏输入后,userName自动变username
因为可能它走了缓存,所以变n
此时在其他文本中复制粘贴修改为userName再重新输入即可
http://localhost:8080/shoppingCart2_war/user/login.do?userName=liguocheng&password=12345
问题六
在html中导入BootStrap框架,但是始终无法在页面显示出来样式,清理缓存target,重新运行。
问题七
控制台出现错误:
Field userMapper in com.lanou.springboot.service.UserService required a bean of type com.lanou.springboot.mapper.UserMapper that could not be found.
在启动类上添加@MapperScan("com.lanou.springboot.mapper")
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-4scLM24e-1658541888620)(C:\Users\pon18\AppData\Roaming\Typora\typora-user-images\image-20220723093643655.png)]](/img/44/47476a0e513c1fd2ecb13c97083ef6.png)
边栏推荐
- 本周投融报:Web3游戏熊市吸金
- Nodejs implements token login registration (koa2)
- gom及gee架设黑屏的原因以及个别装备地图不显示怎么办?
- Lake Shore—EMPX-H2 型低温探针台
- Opencv open camera, edge detection
- Microcomputer principle and technical interface practice in class
- 简单了解首个 EVM 等效的 zkEVM Polygon 为何全力押注
- OpenIM重大升级-群聊读扩散模型发布 群管理功能升级
- [MySQL]一、MySQL起步
- 【Flutter -- 布局】弹性布局(Flex 和 Expanded)
猜你喜欢

Notes on Microcomputer Principle and technical interface

零基础怎么自学软件测试?十年测试老鸟最强软件测试学习路线图

IDEA中给项目添加依赖的jar包

Lake Shore—EMPX-H2 型低温探针台

Pyinstaller+InstallForge多文件项目软件打包

Preliminary tutorial of Hezhou esp32c3 PIO Arduino development framework based on vscode

【Flutter -- 布局】弹性布局(Flex 和 Expanded)

死磕递归1:递推公式

Tips and tricks for Neural Networks 深度学习训练神经网络的技巧总结(不定期更新)

js如果小数是0就减去,不是就保留
随机推荐
Pyinstaller+InstallForge多文件项目软件打包
C语言基础篇 —— 2-6 指针、数组与sizeof运算符
Docker install redis
How many common SQL misuses are there in MySQL?
解决data functions should return an object 并(Property “visible“ must be accessed with “$data.visible“)
IR drop, EM, noise and antenna
Wechat applet wx.hideloading() will close the toast prompt box
虾皮二面:JVM内存布局你知道的都说一下?
Leetcode-168.excel table column name
[MySQL]一、MySQL起步
同花顺上选择券商,网上客户经理开户安全吗
pwn入门(3)堆
When does MySQL use table locks and row locks?
IDEA中给项目添加依赖的jar包
Opencv open camera, edge detection
简单了解首个 EVM 等效的 zkEVM Polygon 为何全力押注
JS if the decimal is 0, subtract it, not keep it
OpenIM重大升级-群聊读扩散模型发布 群管理功能升级
Four cores of browser
Fundamentals of C language -- 2-5 points of knowledge about pointers and functions