1:设置类,接口,枚举注解模板
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
/**
* ${DESCRIPTION}
* @author tom_plus
* @date ${YEAR}-${MONTH}-${DAY}-${TIME}
*/
public class ${NAME} {
}
2:设置方法注解
/**
* @description $DESCRIPTION$
* @method $methodName$
$param$
* @return $methodreturntype$
* @date: $date$ $time$
* @author:tom_plus
*/
step1:找到 live templates. stop 2:新建group templates 和live template. stop3:设置参数:见截图A
@param :
groovyScript("def result=''; def params="${_1}".replaceAll('[\\[|\\]|\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {result+=' * @param ' + params[i] + ((i < params.size() - 1) ? '\n\b' : '')}; return result", methodParameters())
idea 中在maven中使用tomcat插件启动项目:
在pom .xml 加入如下配置:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/study_demo</path>
<server>localhost</server>
<uriEncoding>UTF-8</uriEncoding>
<port>8090</port>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
idea生成一个类的serialVersionUID:
url: http://blog.csdn.net/liuzongl2012/article/details/45168585