个人向:spring的报错点及其解决,仅供参考

Spring

No Such Bean Definition Exception: 没有这样的bean 定义异常;(字母写错了,可能是大小写问题)

Illegal State Exception:非法状态异常

No Such Bean Definition Exception: No qualifying bean of type 'com . alibaba . druid . pool .Druid Data Source' available (没有注解 @Bean)

org.springframework.beans.factory.annotation.Autowired:依赖冲突

InvalidTestClassError:无效测试类异常(@Test 没打)

BuilderException: Error creating document instance 错误创建文档实例(业务逻辑层改写的该写的正常写,只是sql语句写在xml里)

TransientDataAccessResourceException:暂态数据访问异常

MethodInvocationProceedingJoinPoint cannot be cast to class:动态代理中 ROUND语句有问题

SQLException: Access denied for user 'root'@'localhost' (using password:
YES)(解决:SpringConfig 配置中的 root密码不对)

返回给前端的json语句中文全是 问号 ? 解决方式: @RequestMapping(value = "/user",produces = "text/plain;charset=utf-8"

produces = "text/plain;charset=utf-8"是设置返回数据格式为文本格式

但是@ResponseBody设置返回数据格式为json字符串格式;会报错.

IllegalStateException[非法状态异常]::No primary or single unique constructor found for interface:检查是否语句是否错误(如data : date)

java:无法访问org.springframework.web.bind.annotation.RequestMapping

  错误的类文件: /D:/develop/WebSoft/apache-maven-3.6.1/mvn_repo/org/springframework/spring-web/6.0.11/spring-web-6.0.11.jar!/org/springframework/web/bind/annotation/RequestMapping.class类文件具有错误的版本 61.0, 应为 55.0

请删除该文件或确保该文件位于正确的类路径子目录中。

(解决 : 依赖问题) 见本文件夹内text ;

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.(spring boot的端口号冲突,在配置中更换端口号,或者停掉一个端口号)

Application run failed: (大概是配置文件没写)

UserConfig(username=null, password=null, addressList=null): 配置文件yaml空格不够 , 优先级应该置顶

MysqlDataTruncation: 先根据findById得到对应的修改对象;(还要数据库与插入的对象属性一一对应);

BindingException:解决::( Parameter 'userName' not found 对应参数的属性需要被实体类对象点出来)

SQLIntegrityConstraintViolationException: 更新没有where 条件

Ambiguous handler methods mapped for : 操作重复,删除单量的那个操作

getWriter() has already been called for this response : 清浏览器缓存

密码跟用户名为传入值为null,但不报错,且在登录校验之后,看一下控制层传参;

Initialization of bean failed;org/aspectj/lang/annotation/Pointcut :: 没有对应的切点以及依赖

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值