1.myeclipse, maven, 新加一个包之后出现An error occurred while filtering resources错误
解决方案:右键项目--》maven--》update project
我百度了一下,An error occurred while filtering resources的翻译是“筛选资源时出错”其实注意翻译就会发现了,只是出错提示里没有明确表示是maven的问题。
参考资料:https://blog.csdn.net/asdfsadfasdfsa/article/details/52946490
2.错误:读取xxxx.jar时出错; invalid LOC header (bad signature)错误
解决方案:把提示的文件删掉让maven重新下载
参考资料:https://www.cnblogs.com/sos-blue/p/5935405.html
3.错误:配置数据库时,启动报错:对实体 "xxxxxxx" 的引用必须以 ';' 分隔符结尾。
解决方案:&符号需要使用"&"转义
参考资料:https://blog.csdn.net/qq_43308851/article/details/85320853
4. 错误: 编码GBK的不可映射字符
解决方案:在pom.xml的/project/build/plugins/下的编译插件声明中加入下面的配置:<encoding>UTF-8</encoding>
参考资料:https://www.cnblogs.com/lavezhang/p/5582484.html
5.clean报错, Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean
问题原因:之前使用run命令开启的实例没有关掉,就进行clean,所以日志文件占用故无法清理
解决方案:关掉正在运行的实例再用clean命令即可
参考资料:https://blog.csdn.net/zcw4237256/article/details/80442681
6.编译报错:NoSuchBeanDefinitionException: No bean named 'memberService' available
问题原因:spring注解配置不正确
解决方案:在spring配置文件中加入以下代码
<!-- 启用注解 -->
<context:annotation-config />
<!-- 启动组件扫描,排除@Controller组件,该组件由SpringMVC配置文件扫描 -->
<context:component-scan base-package="com">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>
7. org.apache.ibatis.reflection.ReflectionException: Error instantiating class com.xxx.model.User with invalid types () or values ();
问题原因:User.java我写了个有参数的构造函数
解决方案:删除了构造函数之后就好了
特此记录。