1,Controller包下的实现类没有标注缺乏@Controller 或者@RequestMapping(" xxx");
缺少@Autowired
2,application-dao.xml文件命名空间加载的顺序颠倒了
3 mapping文件夹下有多个.xml文件时需要 作如下配置
4 在java web工程中使用layui <div class="layui-input-inline">下的<select>标签内容不能显示。
要么将<div class="layui-form"> 与<div class="layui-form-item"> (form表单)删除,要么实现对内容的监听事件。eg。 $('#souBtn').on('click', function(){}
5.从后台获取数据显示无数据。查看console中
补充:type:"post" 是在jquery1.9以后就不再用了
6. 如下图可 解决navicat 数据库插入时的问题field id doesn't have a default value
7.The superclass javax.servlet.http.HttpServlet was not found 参考:https://www.cnblogs.com/achengmu/p/8082457.html
8.Eclipse中通过Maven创建的web项目不能将project facet设置为 dynamic web module 3.0 参考: https://blog.csdn.net/dm1314oooooooo/article/details/70859189
9.${class.id},${role.new} 页面跳转获取跳转前传过来的Model参数时不能包含java关键词。
10.在SSM框架中出现Field error in object 'xxx' on field 'XXX': rejected value [];错误 :运行SQL语句是否能正常运行。或者java 中的数据类型int 改为 Integer。
11.tomcat端口被占用。(8080 8005 8009):直接ctrl+shift+esc 打开任务管理器,打开服务,将其中的javaw应用程序kill。
12.tomcat 每次update Maven后都会出现jdk1.7变成了jdk1.5 直接在pom.xml中加上下面代码(<dependencies>对标签之外)
<build>
<finalName>MavenProject</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
13.tomcat cannot run on any server 。直接将项目下的.setting文件夹下的最长的那个.xml文件里的web 的version3.0改为2.5。然后重启!
14. HttpServlet cannot be resolved to a type请检查:项目右击property-->library里是否有server runtime如果没有,add library添加一个tomcat7
15,cannot change the version to 3.0(此错误网上解答很多,基本都能解决),如果最终能运行,就是在problems中显示error,强迫症患者可以直接update project更新,如果还不行,直接右击delete重编译就可以了。
16,Unsupported major.minor version 52.0 解决办法 参考https://www.cnblogs.com/jpfss/p/9036645.html
17,一些列的cannot resolved to a type问题:要么是jar包冲突,jar包缺少,依赖少些,补充:
常用的<groupId>org.springframework</groupId> 下的spring-core\spring-context\spring-context-support\spring-beans\spring-webmvc\spring-jdbc\spring-web\spring-aspects等等版本号保持一致,另外有些配置环境下需要将4.3.3版本号改为4.3.7!
18,运行时报错Unsatisfied dependency expressed through field 'authorizationService'
解决办法:在service实现类前加:
@Service
@SuppressWarnings("rawtypes")
19,mybaits错误解决:There is no getter for property named ... in 'class java.lang.String' 解决办法:建议直接用实体类来传递参数,就不要单独的用int id或者String name等等单独去传递单个参数了!
20,导入的.js文件在每次update工程或者invalidate后报错,解决方法:在
右击有问题的js文件invalidate ,然后刷新
21.警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:bos19' did not find a matching property. 解决方法:将项目文件路径下如D:\learn\Java\MyEclipse\Workspaces\MyEclipse 2017 CI\.metadata\.plugins\org.eclipse.wst.server.core 里的文件全删除后重启服务器即可,详情参考:https://www.cnblogs.com/chenmingjun/p /9737226.html