java svn 版本号_eclipse中的Java文件自动根据svn版本号生成注释
經常在java代碼中看到以下的注釋($Rev: $Date),是不是很酷,怎么生成的呢?
/**
* A FilterChain is an object provided by the servlet container to the developer
* giving a view into the invocation chain of a filtered request for a resource. Filters
* use the FilterChain to invoke the next filter in the chain, or if the calling filter
* is the last filter in the chain, to invoke the rosource at the end of the chain.
*
* @see Filter
* @since Servlet 2.3
*
* @version $Rev: 46019 $ $Date: 2004-09-14 04:56:06 -0500 (Tue, 14 Sep 2004) $
*/
public interface FilterChain {
一、eclipse中配置:
windows-->preference
Java-->Code Style-->Code Templates
code-->new Java files
編輯它
* 更新: $$Date$$
* 作者: $$Author$$
* 版本: $$Rev$$
* ID ?:$$Id$$
二、修改svb配置文件
windows7 下 ,修改 C:/Users/your username/AppData/Roaming/Subversion 目錄下
xp下,修改C:/Documents and Settings/Administrator/Application Data/Subversion/ 目錄下
的 config文件,取消掉 “enable-auto-props = yes” 的注釋
在[auto-props]下,加入:
*.java = svn:keywords=Date Rev Id ?Author
*.txt = svn:keywords=LastChangedDate LastChangedRevision
總結
以上是生活随笔為你收集整理的java svn 版本号_eclipse中的Java文件自动根据svn版本号生成注释的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《一粒红尘》结局是什么 剧中各人物结局揭
- 下一篇: 月神的迷宫星幽尘埃怎么获得