IDEA与Eclipse

IDEA

1 快捷键

快速查找某个类 double shift
显示类结构图 ctrl+H
代码上移或下移 ctrl+shift+up/down
查找文件 ctrl+shift+N
删除当前行 ctrl+x
生成get、set方法 alt+Ins
实现接口 ctrl+I
快速引入类 alt+enter
快速创建类 ctrl+alt+insert
格式化代码 ctrl+alt+L
替换 ctrl+R
显示项目列表 alt+1
显示某个类下的方法列表 alt+7
快速定位到某行 ctrl+G

2 出现的问题

0x01 找不到资源文件

右键选中资源文件——Mark Directory As SourceRoot

0x02 Junit中LogFactory类没有找到

报错
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

选中项目——F4——Libraries——找到出现问题的包

commons-logging:xxxxxdoes-not-exist

3 一些操作

文件重命名:选中文件——选中——Refactor——Rename

Eclipse

1 出现的问题

0x01 Perhaps you are running on a JRE rather than a JDK?

window -->Prefrences -->Java-->Installed JREs
换成jdk

2、配置tomcat报错

The Apache Tomcat installation at this directory is version 8.5.0. A Tomcat 8.0 installation is expected.

换一个版本

3、ContextLoaderListener

java.lang.ClassNotFoundException: ContextLoaderListener

http://chenzhou123520.iteye.com/blog/1836987

4、Maven项目转成web项目

http://blog.csdn.net/chuyuqing/article/details/28879477

posted @ 2016-11-28 14:39  清泉白石  阅读(277)  评论(0编辑  收藏  举报