当前位置:网站首页>项目中遇到的问题及解决
项目中遇到的问题及解决
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)
边栏推荐
猜你喜欢

灰色关联分析(MATLAB)

【30. n-皇后问题】

Summary of after class homework of Microcomputer Principle and technical interface

Function secondary development / plug-in development of JMeter (detailed version)

Notes on Microcomputer Principle and technical interface

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

【31. 走迷宫(BFS)】

Compose canvas pie chart effect drawing

Récursion des bosses 1: formule récursive

General paging implementation
随机推荐
Object.defineProperty方法、数据代理
ROS2自学笔记:Rviz可视化工具
新零售电商平台怎么做?才能实现传统零售企业数字化转型?
【30. n-皇后问题】
Shell | 查看进程的方法的不完全总结
UPC 2022暑期个人训练赛第12场(B 组合数)
MATLAB基础
深度学习学习记录-优化器的学习率的更新
keil错误和解决办法(1):FCARM - Output Name not specified, please check ‘Options for Target - Utilities‘
死磕递归1:递推公式
层次分析法(MATLAB)
低代码搭建校园信息化管理系统案例分析
Failure analysis and solution of vscode PIO creation project
Eureka笔记
pinia(菠萝)
NodeJs实现token登录注册(KOA2)
Browser homology policy
oracle 数据库 11C 之后版本使用 memory_target 自动内存管理
Weisfeiler-Lehman图同构测试及其他
Shrimp noodles: what do you know about the JVM memory layout?