spring问题

1、The matching wildcard is strict ,but no declaration can be found for element 'tx:annotation-driven'

原因:在application.xml中使用了tx-4.1的xsd引用,但在项目lib中使用了spring-tx-3.*.jar;

解决:使用spring-tx-4.1.jar,删除spring-tx-3.*.jar

2、eclipse中的spring 应用启动超时,可能的一个原因是配置文件中设置的数据库连接信息有误;今天遇到一个应用使用了quatz,这个quatz需要连接数据库操作,但连接数据库设置有误,导致spring 无法初始化这个类,也就无法完成web应用启动;

可以将logback的日志启动级别修改为debug,就能更方便的看到启动时出现的异常;

3、

详解Spring MVC中不同格式的POST请求参数的数据类型转换过程

https://segmentfault.com/a/1190000009163158

4、post请求出现这个问题:

org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error

排查是post请求中payload中没有传递正确的json格式数据。

原文地址:https://www.cnblogs.com/zhucezmf/p/10761603.html