1. Maven项目只有pom类型可以被当做父项目继承。
- 依赖父项目
crowdFunding-parent com.my 1.0-SNAPSHOT ../crowdFunding-parent/pom.xml
- 依赖子项目
com.my crowdFunding-common1.0-SNAPSHOT
2. classpath和classpath*区别
- classpath:只会到class路径中查找文件,仅仅加载第一个classpath路径。
- classpath*:不仅包含class路径,还会扫描所有这些JAR包及类路径下出现的同名文件。
3. web.xml配置命名时注意别搞混。
4. Maven项目war包运行时无法执行clean命令,需要先关闭tomcat或者任务管理器关闭进程。
Failed to clean project: Failed to delete D:CodedemocrowdFundingcrowdFunding-webtargetcrowdFunding-web-1.0-SNAPSHOTWEB-INFlibcrowdFunding-manager-1.0-SNAPSHOT.jar -> [Help 1]
5. mybatis报错:invalid types () or values ()
- 实体类中的所有字段添加getter和setter方法。
- 实体类需要无参的构造函数。
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating class com.my.cf.bean.User with invalid types () or values (). Cause: java.lang.NoSuchMethodException: com.my.cf.bean.User.()
6. 路径以斜杠开头的相对路径,在不同的场景中,表示的相对位置会发生变化。
例如:url : http://localhost:8080/webapp/test/test.html
前台路径:;
相当于=========相对服务器的根 : http://localhost:8080/sssss
后台路径:forward(”/user.jsp”)
相当于=========相对web应用的根:http://localhost:8080/webapp/user.jsp



