eclipse相关一些基本设置及常见问题记录

eclipse常用基本设置
svn/findbugs:
--Install New Software里安装两个插件,svn(http://subclipse.tigris.org/update_1.10.x)和findbugs(http://findbugs.cs.umd.edu/eclipse).
--Window->Perferences->Team->Ignored Resources-->添加忽略同步的资源匹配(如bin等)
maven:
--Window-Perferences-Maven->Installations-->设置安装的maven路径及settings.xml
--Window-Perferences-Maven->Errors/Warnings-->将Plugin execution not covered by lifecycle configuration设置为Ignore 
tomcat:
--Window->Perferences->Server->Runtime Environment-->添加安装好的tomcat
--Servers下添加tomcatserver
编码设置:
--Window->Perferences->General->Workspace-->Text file encoding 改为UTF-8
--Window->Perferences->General->Content Types-->设置一些文件类型默认编码为UTF-8(如.properties等)
关闭xml验证:
--Window->Perferences->Validation-->找到XML Validator和XML Schema Validator取消Build下的勾,保持Manual下的勾(因为需要手动可以验证)
控制台显示行数设置:
--Window->Perferences->Run/Debug->Console-->去掉 Limit console output前面的勾或者设置Console buffer size
保存java文件格式化相关:
--Window->Perferences->Java->Editor-->Save Actions-->自行设置(保存时自动格式化
--Window->Perferences->Java->Code Style->Formatter-->Eclipse [built-in]复制一个,然后Edit修改Comments标签(比如可以在格式化时不打乱注释)

常见问题记录

1、tomcat部署项目时在“Add Web Module”中找不到工程.

     原因是pom中的packaging节点是jar,应改为war.

2、svn遇到以下异常,文件被锁定,同步不了

org.apache.subversion.javahl.ClientException: Attempted to lock an already-locked dir
svn: Commit failed (details follow):
svn: Working copy 'D:\workspace\webtest\src\main\java\com\hikvision\webtest\common\proxy' locked.
svn: 'D:\workspace\webtest\src\main\java\com\hikvision\webtest\common\proxy' is already locked.
若在eclipse中,可以试试项目右键->Team->Refresh/Cleanup

3、spring容器中的bean被实例化多次(initWebApplicationContext被执行多次)

       原因1是在配置tomcat 的Server时,Server Locations下的Deploy path选了tomcat的webapps路径,换成其他就好(比如默认的wtpwebapps)

       原因2是spring和springmvc都加载了相同的spring配置文件,重复扫描了注解bean

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值