锘??xml version="1.0" encoding="utf-8" standalone="yes"?> YUI錛屽紑鍙戜笉鏂紝鐜板湪宸茬粡鍦ㄥ叾涓坊鍔犱簡css甯冨眬鐨勪竴涓猯ib style錛岃佸浼欎簡錛屽唴瀹瑰緢澶氾紝涓嶄粎浠呮槸甯冨眬錛屾嵁璇翠粈涔堢綉绔欏彧瑕佹斁涓婅繖涓氨浼氭紓浜澶氾紝鍛靛懙銆?/p>
聽 From: http://springide.org/project/wiki/SpringideGuide聽 See also: SpringProject, SpringProjectNature See also: SpringProject See also: BeansConfig, BeansConfigSet See also: BeansProjectProperties?, BeansConfig See also: BeansConfig, BeansConfigSet, BeansConfigValidator See also: BeansView, BeansConfig, BeansXmlEditor See also: BeansConfig, BeansConfigValidator See also: BeansView, BeansConfig, BeansConfigSet, BeansGraph See also: BeansSearch
褰撶劧鍏朵粬鐨勬湁寰堝錛岃繖鍑犱釜鍙槸鎴戞帴瑙﹀埌鐨勶紝嬈㈣繋澶у娣誨姞鍝︺?/p>
]]>
To start working with Spring IDE you need a SpringProject. A SpringProject can be created by adding the SpringProjectNature to an existing project or by creating a new Spring project with the SpringProjectWizard. Add SpringProject nature 露
Create new SpringProject 露
Add references to other Spring projects (optional) 露
Add Spring BeansConfig files 露
Create Spring BeansConfig file sets (optional) 露
Open Spring BeansView 露
Validate Spring BeansConfig file 露
Open Spring BeansGraph 露
Search for Spring Beans 露
Attachments
added screenshoot
, added by tjuerge on 07/16/05 16:14:33.
added screenshoot
, added by tjuerge on 07/16/05 16:14:44.
added screenshoot
, added by tjuerge on 07/16/05 16:36:31.
added screen shoot
, added by tjuerge on 07/16/05 18:23:19.
Screenshoot of wizard selection dialog
, added by tjuerge on 04/04/06 22:53:39.
Screenshoot of Spring project wizard
, added by tjuerge on 04/04/06 22:56:07.
Screenshoot of Spring Beans search dialog
, added by tjuerge on 04/04/06 23:21:51.
Spring project properties dialog with Add BeansConfig dialog
, added by tjuerge on 04/24/06 00:24:35.
Spring project properties dialog with BeansConfig tab
, added by tjuerge on 04/24/06 00:25:05.
Package explorer with decorated BeansConfig files
, added by tjuerge on 04/24/06 00:26:00.
Spring project properties dialog with BeansConfigSet tab
, added by tjuerge on 04/24/06 00:42:41.
Create new BeansConfigSet dialog
, added by tjuerge on 04/24/06 00:43:18.
Spring project properties dialog with BeansConfigSet tab
, added by tjuerge on 04/24/06 00:44:37.
Editor and Beans View
, added by tjuerge on 04/24/06 00:52:00.
Editor with problem markers and problem view
, added by tjuerge on 04/24/06 01:09:40.
BeansGraph with outline view
, added by tjuerge on 04/24/06 01:13:27.
]]>
璇風偣鍑誨涓嬭繛鎺?br />http://blog.matrix.org.cn/page/icess?entry=subversion_d
]]>
浣跨敤 Eclipse銆乄eb Tools Platform (WTP) for Eclipse銆丏erby 鍜?Jakarta-Tomcat 鏋勫緩鍔ㄦ?Web 搴旂敤紼嬪簭鏄歡寰堝鏄撶殑浜嬨傛湰鏂囧皢甯︽偍瀛︿範濡備綍瀹夎鍜岄厤緗墍鏈夎繖浜涘繀闇鐨勫紑鏀炬簮鐮佺粍浠訛紝騫朵嬌鐢?JSP 鍜?servlet 鏋勫緩涓涓畬鏁寸殑鐢ㄤ簬鍚?Derby 鏁版嵁搴撳瓨鍌ㄥ拰鑾峰彇淇℃伅鐨?Web 搴旂敤紼嬪簭銆?br />
璇︾粏鎯呭喌鐐瑰嚮 榪炴帴: http://www-128.ibm.com/developerworks/cn/db2/library/techarticles/dm-0501roux/index.html聽
Args4J 鏄竴涓敤鏉ュ嚭鏉ュ懡浠よ鐨勫伐鍏?
鍦ㄥ疄闄呯殑欏圭洰涓敤鍒板懡浠よ鐨勫茍涓嶆槸寰堝父瑙?浣嗗綋鐪熸浣跨敤鍒版椂,鐗瑰埆鏄湪紼嬪簭鍚姩鏃墮厤緗竴涓嬪弬鏁扮殑鏃跺欏氨寰堟湁鐢ㄤ簡,濡傛灉鍙傛暟寰堝鐨勮瘽,涓涓竴涓В鏋愬懡浠よ榪樻槸姣旇緝楹葷儲鐨?榪欐椂浣跨敤Args4J灝辯浉褰撳ソ鍔炰簡. 鍦ㄦ湰鏂囦腑鎴戜滑鏉ョ湅鐪婣rgs4J鐨勪嬌鐢?褰撻渶瑕佹椂鑳芥彁渚涗竴涓В鍐蟲柟妗?
Args4J浣跨敤涓涓縐頒負Option綾葷殑綾繪潵淇濆瓨杈撳叆鐨勫弬鏁?璁╁悗鏍規嵁璇ョ被鏉ュ簲鐢ㄥ弬鏁?姣忎釜鍙傛暟鍙互瀵瑰簲涓涓被涓殑灞炴?璇ュ睘鎬х敤Annotation娉ㄩ噴,鍦ˋnnotation涓粰鍑鴻鍙傛暟 鐨勯夐」, 榪樺彲浠ラ厤緗叾浠栨湁鐢ㄧ殑淇℃伅.璇nnotation灝辨槸 Option 娉ㄨВ: 璇ユ敞瑙g殑doc濡備笅:
Marks a field/setter that receives a command line switch value.
This annotation can be placed on a field of type T or the method of the form void methodName(T value). Its access modified can be anything, but if it's not public, your application needs to run in a security context that allows args4j to access the field/method (see AccessibleObject.setAccessible(boolean)
.
The behavior of the annotation differs depending on T --- the type of the field or the parameter of the method.
When T is boolean , it represents a boolean option that takes the form of "-OPT". When this option is set, the property will be set to true.
When T is String
, it represents an option that takes one operand. The value of the operand is set to the property.
When T is derived from Enum
, it represents an option that takes an operand, which must be one of the enum constant. The comparion between the operand and the enum constant name is done in a case insensitive fashion.
For example, the following definition will represent command line options like "-coin penny" or "-coin DIME" but things like "-coin" or "-coin abc" are errors.
enum Coin { PENNY,NICKEL,DIME,QUARTER } class Option { @Option(name="-coin") public Coin coin; }
When T is a File
, it represents an option that takes a file/directory name as an operand.
璇ユ敞瑙f湁5鍚勫煙 鍏朵腑name鏄繀欏葷殑,鍏朵粬鍥涗釜鏄彲閫夌殑.濡備笅鎵紺?鍏充簬璇ユ敞瑙g殑璇︾粏Doc璇鋒煡鐪?鍏禿ocs.
Required Element Summary | |
---|---|
聽String
|
name
聽聽聽聽聽聽聽聽聽聽Name of the option, such as "-foo" or "-bar". |
Optional Element Summary | |
---|---|
聽Class<? extends OptionHandler> | handler 聽聽聽聽聽聽聽聽聽聽Specify the OptionHandler that processes the command line arguments. |
聽String | metaVar 聽聽聽聽聽聽聽聽聽聽When the option takes an operand, the usage screen will show something like this: |
聽boolean | required 聽聽聽聽聽聽聽聽聽聽Specify that the option is mandatory. |
聽String | usage 聽聽聽聽聽聽聽聽聽聽Help string used to display the usage screen. |
銆
褰撳懡浠よ璁懼畾鍚?鍏朵嬌鐢ㄦ柟寮忓拰java 鍛戒護閲岄潰鐨勫弬鏁頒嬌鐢ㄦ柟寮忎竴鏍?濡?java -cp ./calssPath/.......
涓嬮潰閫氳繃涓涓緥瀛愭潵瑙i噴:
001聽/*
002聽聽*聽Created聽on聽2006-2-21
003聽聽*聽@author聽icerain
004聽聽*/
005聽package聽test.args4j;
006聽
007聽import聽org.kohsuke.args4j.Argument;
008聽import聽org.kohsuke.args4j.CmdLineException;
009聽import聽org.kohsuke.args4j.CmdLineParser;
010聽import聽org.kohsuke.args4j.ExampleMode;
011聽import聽org.kohsuke.args4j.Option;
012聽import聽org.kohsuke.args4j.spi.BooleanOptionHandler;
013聽
014聽import聽java.io.File;
015聽import聽java.io.IOException;
016聽import聽java.util.ArrayList;
017聽import聽java.util.List;
018聽
019聽public聽class聽TestArgs4J聽{
020聽聽聽//聽鍒╃敤Option娉ㄨВ鏉ュ畾涔変竴涓猙oolean聽鍛戒護琛屽弬鏁奧犲叾鍙傛暟name涓郝?re聽,required鎸囧畾璇ュ弬鏁版槸蹇呴』鐨?/font>
021聽聽聽@Option(name聽=聽"-re",聽usage聽=聽"recursively聽run聽something",聽required聽=聽true)
022聽聽聽private聽boolean聽recursive;
023聽
024聽聽聽//鍒╃敤Option娉ㄨВ瀹氫箟涓涓狥ile聽鍛戒護琛屽弬鏁?聽name涓?o,聽杈撳叆鏃跺欑煡閬撹file鐨勮礬寰勫氨鍙互浜?/font>
025聽聽聽//metaVar聽鐢ㄦ潵璁懼畾鏄劇ず聽浣跨敤鏂瑰紡鏃跺欑殑杈撳嚭,榪欎釜杈撳嚭涓?o聽OUTPUT聽:聽output聽to聽this聽file
026聽聽聽//濡傛灉涓嶆寚瀹氳灞炴犲垯浣跨敤榛樿鐨勪唬鏇柯犱負-o聽FILE聽:聽output聽to聽this聽file
027聽聽聽@Option(name聽=聽"-o",聽usage聽=聽"output聽to聽this聽file",聽metaVar聽=聽"OUTPUT")
028聽聽聽private聽File聽out聽=聽new聽File(".");
029聽
030聽聽聽//If聽'usage'聽value聽is聽empty,聽the聽option聽will聽not聽be聽displayed
031聽聽聽聽聽//聽in聽the聽usage聽screen.
032聽聽聽//娉ㄦ剰璇ュ娌℃湁鎸囧畾聽usage聽灞炴犳垨鑰呮寚瀹歶sage聽浣嗘槸鍏跺間負絀虹殑聽濡倁sage聽=聽"",榪欐牱褰撲嬌鐢?/font>
033聽聽聽//parser.printExample(ExampleMode.ALL)聽璇鋒敞鎰忎笅闈㈢92琛岀殑杈撳嚭
034聽聽聽@Option(name聽=聽"-str",聽required聽=聽true)
035聽聽聽//@Option(name聽=聽"-str",聽usage聽=聽"嫻嬭瘯",聽required聽=聽true)聽聽//聽璇ヨ聽-str鍙傛暟鏈夌敤
036聽聽聽//聽no聽usage
037聽聽聽
038聽聽聽private聽String聽str聽=聽"(default聽value)";
039聽
040聽聽聽//聽鏁存暟鍙傛暟
041聽聽聽@Option(name聽=聽"-n",聽usage聽=聽"repeat聽<n>聽times\nusage聽can聽have聽new聽lines聽in聽it聽and聽also聽it聽can聽be聽verrry聽long")
042聽聽聽private聽int聽num聽=聽-1;
043聽
044聽聽聽//聽using聽'handler=...'聽allows聽you聽to聽specify聽a聽custom聽OptionHandler
045聽聽聽//聽implementation聽class.聽This聽allows聽you聽to聽bind聽a聽standard聽Java聽type
046聽聽聽//聽with聽a聽non-standard聽option聽syntax
047聽聽聽//鎸囧畾涓涓壒瀹氱殑handler聽
048聽聽聽@Option(name聽=聽"-custom",聽handler=BooleanOptionHandler.class,usage="boolean聽value聽for聽checking聽the聽custom聽handler")
049聽聽聽private聽boolean聽data;
050聽
051聽聽聽//聽receives聽other聽command聽line聽parameters聽than聽options
052聽聽聽@Argument
053聽聽聽private聽List<String>聽arguments聽=聽new聽ArrayList<String>();
054聽
055聽聽聽public聽static聽void聽main(String[]聽args)聽throws聽IOException聽{
056聽聽聽聽聽new聽TestArgs4J().doMain(args);
057聽聽聽}
058聽
059聽聽聽public聽void聽doMain(String[]聽args)聽throws聽IOException聽{
060聽聽聽聽聽//Creates聽a聽new聽command聽line聽owner聽that聽parses聽arguments/options
聽聽聽聽聽聽聽聽聽聽聽聽聽and聽set聽them聽into聽the聽given聽object.
061聽聽聽聽聽CmdLineParser聽parser聽=聽new聽CmdLineParser(this);
062聽
063聽聽聽聽聽try聽{
064聽聽聽聽聽聽聽//聽parse聽the聽arguments.
065聽聽聽聽聽聽聽parser.parseArgument(args);
066聽
067聽聽聽聽聽聽聽//聽you聽can聽parse聽additional聽arguments聽if聽you聽want.
068聽聽聽聽聽聽聽//聽parser.parseArgument("more","args");
069聽
070聽聽聽聽聽聽聽//聽after聽parsing聽arguments,聽you聽should聽check
071聽聽聽聽聽聽聽//聽if聽enough聽arguments聽are聽given.
072聽聽聽聽聽聽聽if聽(arguments.isEmpty())
073聽聽聽聽聽聽聽聽聽throw聽new聽CmdLineException("No聽argument聽is聽given");
074聽
075聽聽聽聽聽}聽catch聽(CmdLineException聽e)聽{
076聽聽聽聽聽聽聽//聽if聽there's聽a聽problem聽in聽the聽command聽line,
077聽聽聽聽聽聽聽//聽you'll聽get聽this聽exception.聽this聽will聽report
078聽聽聽聽聽聽聽//聽an聽error聽message.
079聽聽聽聽聽聽聽System.err.println(e.getMessage());聽聽//鎵撳嵃鍑洪敊娑堟伅
080聽聽聽聽聽聽聽System.err.println("java聽SampleMain聽[options...]聽arguments...");
081聽聽聽聽聽聽聽//聽print聽the聽list聽of聽available聽options
082聽聽聽聽聽聽聽parser.printUsage(System.err);聽聽//聽鎵撳嵃鍙傛暟鐨勭敤娉?/font>
083聽聽聽聽聽聽聽System.err.println();
084聽
085聽聽聽聽聽聽聽System.err.println("嫻嬭瘯!!!!!");
086聽聽聽聽聽聽聽//聽print聽option聽sample.聽This聽is聽useful聽some聽time
087聽聽聽聽聽聽聽System.err.println("聽聽Example:聽java聽SampleMain"
088聽聽聽聽聽聽聽聽聽聽聽+聽parser.printExample(ExampleMode.ALL));聽聽聽聽聽聽聽
// 娉ㄦ剰 鍦∣ption涓鏋滄病鏈夋寚瀹?usage 灞炴?
089聽聽聽聽聽聽聽System.err.println("/n聽2.........");聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
//鍒欒繖涓よ紼嬪簭涓嶄細杈撳嚭璇ュ弬鏁扮殑浣跨敤鐨?/font>
090聽
091聽聽聽聽聽聽聽System.err.println("聽2聽Example2:聽java聽SampleMain"聽
//娉ㄦ剰 鍦∣ption涓鏋滄病鏈夋寚瀹?usage 灞炴?
092聽聽聽聽聽聽聽聽聽聽聽+聽parser.printExample(ExampleMode.REQUIRED));聽聽
//鍒欒繖涓よ紼嬪簭涓嶄細杈撳嚭璇ュ弬鏁扮殑浣跨敤鐨?/font>
093聽聽聽聽聽聽聽return;
094聽聽聽聽聽}
095聽
096聽聽聽聽聽//聽this聽will聽redirect聽the聽output聽to聽the聽specified聽output
097聽聽聽聽聽System.out.println(out);
098聽
099聽聽聽聽聽if聽(recursive)
100聽聽聽聽聽聽聽System.out.println("-r聽flag聽is聽set");
101聽
102聽聽聽聽聽if聽(data)
103聽聽聽聽聽聽聽System.out.println("-custom聽flag聽is聽set");
104聽
105聽聽聽聽聽System.out.println("-str聽was聽"聽+聽str);
106聽
107聽聽聽聽聽if聽(num聽>=聽0)
108聽聽聽聽聽聽聽System.out.println("-n聽was聽"聽+聽num);
109聽
110聽聽聽聽聽//聽access聽non-option聽arguments
111聽聽聽聽聽System.out.println("other聽arguments聽are:");
112聽聽聽聽聽for聽(String聽s聽:聽arguments)
113聽聽聽聽聽聽聽System.out.println(s);
114聽聽聽}
115聽
116聽}
褰撲笉浣跨敤鍛戒護琛屾椂鍊?杈撳叆淇℃伅濡備笅:
Option "-re" is required
java SampleMain [options...] arguments...
-custom : boolean value for checking the custom handler
-n N : repeat <n> times
usage can have new lines in it and also it can be verrrrrrr
rrrrrrrrrrry long
-o OUTPUT : output to this file
-re : recursively run something
嫻嬭瘯!!!!!
Example: java SampleMain -custom -n N -o OUTPUT -re聽聽
// 娉ㄦ剰璇ュ娌℃湁 -str鐨勫嚭鐜?/b>/n 2.........
2 Example2: java SampleMain -re
聽// 娉ㄦ剰璇ュ娌℃湁 -str鐨勫嚭鐜?/b>褰撲嬌鐢?-re 涓哄懡浠よ杈撳叆鏃?杈撳嚭濡備笅:// 鍚庝負浣滆呭姞鐨勬敞閲?涓嶆槸杈撳嚭
Option "-str" is required聽
聽//涔熻鎸囧畾-str璇ュ弬鏁?java SampleMain [options...] arguments...
-custom : boolean value for checking the custom handler
-n N : repeat <n> times
usage can have new lines in it and also it can be verrrrrrr
rrrrrrrrrrry long
-o OUTPUT : output to this file
-re : recursively run something
嫻嬭瘯!!!!!
Example: java SampleMain -custom -n N -o OUTPUT -re
/n 2.........
2 Example2: java SampleMain -re
褰撲嬌鐢?re -str some 涓哄懡浠よ杈撳叆鏃?緇撴灉濡備笅:榪欐槸鐢變簬鐨?3 琛岀殑鍒ゆ柇寮曡搗鐨?/p> No argument is given java SampleMain [options...] arguments... -custom : boolean value for checking the custom handler -n N : repeat <n> times usage can have new lines in it and also it can be verrrrrrr rrrrrrrrrrry long -o OUTPUT : output to this file -re : recursively run something 嫻嬭瘯!!!!! Example: java SampleMain -custom -n N -o OUTPUT -re /n 2......... 2 Example2: java SampleMain -re
浣跨敤-custom -n 2 -re -str some otherstring 涓哄懡浠よ杈撳叆鏃剁殑 緇撴灉濡備笅:
.聽聽聽 // file
-r flag is set
-custom flag is set
-str was some
-n was 2
other arguments are:
otherstring
褰撲嬌鐢?custom -n 2 -re -str some -o log.txt otherstring 鏃跺欑殑杈撳嚭濡備笅:
log.txt
-r flag is set
-custom flag is set
-str was some
-n was 2
other arguments are:
otherstring
褰撲嬌鐢ㄤ竴涓笉瀛樺湪鐨勫弬鏁版椂鍊?浼氭湁Exception鐨?渚嬪:-custom -ee 2 -re -str some -o log.txt otherstring
鍏朵腑-ee鍙傛暟涓嶅瓨鍦?緇撴灉濡備笅:
"-ee" is not a valid option
java SampleMain [options...] arguments...
-custom : boolean value for checking the custom handler
-n N : repeat <n> times
......
鐢變互涓婄殑瀹炰緥鍙互鐪嬪嚭 args4J 鍙栧緱鍛戒護琛岀殑杈撳叆鍙傛暟,鐒跺悗鏍規嵁淇濆瓨鍙傛暟鐨勭被涓殑灞炴х被鍨嬫瘮杈?br />聽
騫惰漿鎹負閫傚綋鐨勫? 鐒跺悗鎴戜滑鍙互浣跨敤榪欎簺灞炴т簡,榪欐牱灝卞厤鍘諱簡鑷繁鍒ゆ柇args 鐨勯夯鐑︿簡,
褰撻粯璁ょ殑Handler涓嶆弧瓚充綘鐨勮姹傛椂 鍙互鑷繁鎵╁睍Handler瀹炵幇,鍏充簬榪欑偣璇峰弬鑰傾rgs4J鐨勬祴璇曠敤渚?
From : java 鐖卞ソ鑰?/a>聽 by : icess