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

Bag of tricks for image classification "with convolutional neural networks"

【Web漏洞探索】SQL注入漏洞

Pymoo学习 (3):使用多目标优化找到最优解的集合

虾皮二面:JVM内存布局你知道的都说一下?

新零售电商平台怎么做?才能实现传统零售企业数字化转型?

搜索二叉树——寻找节点,插入节点,删除节点

keras——accuracy_score公式

Dead beat recursion 1: recursive formula

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

JS if the decimal is 0, subtract it, not keep it
随机推荐
iphone 无法打开openv**文件的解决方案
Pyinstaller+InstallForge多文件项目软件打包
Fundamentals of C language -- the data type meaning of 2-4 pointers and the analysis of forced type conversion
Object.defineProperty方法、数据代理
Eureka笔记
微信小程序wx.hideLoading()会关闭toast提示框
Sprintf and cv:: puttext
Win11如何添加图片3D效果?Win11添加图片3D效果的方法
Four cores of browser
Function secondary development / plug-in development of JMeter (detailed version)
腾讯撕开中国NFT的“遮羞布”
July training (day 23) - dictionary tree
死磕遞歸1:遞推公式
CSR、SSR 与 SSG
Docker install redis
keil错误和解决办法(1):FCARM - Output Name not specified, please check ‘Options for Target - Utilities‘
Is it safe for online account managers to open accounts when choosing securities companies in flush
C语言基础篇 —— 2-6 指针、数组与sizeof运算符
Search Binary Tree - find nodes, insert nodes, delete nodes
【31. 走迷宫(BFS)】