色综合久久综合网,欧美日韩中文精品,一区二区三区四区乱视频 http://www.aygfsteel.com/luyongfa/zh-cnSun, 18 May 2025 14:52:16 GMTSun, 18 May 2025 14:52:16 GMT60SQL優(yōu)化http://www.aygfsteel.com/luyongfa/articles/429429.htmlMr.luMr.luThu, 25 Feb 2016 06:24:00 GMThttp://www.aygfsteel.com/luyongfa/articles/429429.htmlhttp://www.aygfsteel.com/luyongfa/comments/429429.htmlhttp://www.aygfsteel.com/luyongfa/articles/429429.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/429429.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/429429.html1.對查詢進行優(yōu)化,要盡量避免全表掃描,首先應(yīng)考慮在 where 及 order by 涉及的列上建立索引。

2.應(yīng)盡量避免在 where 子句中對字段進行 null 值判斷,否則將導(dǎo)致引擎放棄使用索引而進行全表掃描,如:

select id from t where num is null

最好不要給數(shù)據(jù)庫留NULL,盡可能的使用 NOT NULL填充數(shù)據(jù)庫.

備注、描述、評論之類的可以設(shè)置為 NULL,其他的,最好不要使用NULL。

不要以為 NULL 不需要空間,比如:char(100) 型,在字段建立時,空間就固定了, 不管是否插入值(NULL也包含在內(nèi)),都是占用 100個字符的空間的,如果是varchar這樣的變長字段, null 不占用空間。

可以在num上設(shè)置默認值0,確保表中num列沒有null值,然后這樣查詢:

select id from t where num = 0

3.應(yīng)盡量避免在 where 子句中使用 != 或 <> 操作符,否則將引擎放棄使用索引而進行全表掃描。

4.應(yīng)盡量避免在 where 子句中使用 or 來連接條件,如果一個字段有索引,一個字段沒有索引,將導(dǎo)致引擎放棄使用索引而進行全表掃描,如:

select id from t where num=10 or Name = 'admin'

可以這樣查詢:

select id from t where num = 10 union all select id from t where Name = 'admin'

5.in 和 not in 也要慎用,否則會導(dǎo)致全表掃描,如:

select id from t where num in(1,2,3)

對于連續(xù)的數(shù)值,能用 between 就不要用 in 了

select id from t where num between 1 and 3

很多時候用 exists 代替 in 是一個好的選擇:

select num from a where num in(select num from b)

用下面的語句替換:

select num from a where exists(select 1 from b where num=a.num)

6.下面的查詢也將導(dǎo)致全表掃描:

select id from t where name like%abc%

若要提高效率,可以考慮全文檢索。

7.如果在 where 子句中使用參數(shù),也會導(dǎo)致全表掃描。因為SQL只有在運行時才會解析局部變量,但優(yōu)化程序不能將訪問計劃的選擇推遲到運行時;它必須在編譯時進行選擇。然 而,如果在編譯時建立訪問計劃,變量的值還是未知的,因而無法作為索引選擇的輸入項。如下面語句將進行全表掃描:

select id from t where num = @num

可以改為強制查詢使用索引:

select id from t with(index(索引名)) where num = @num

應(yīng)盡量避免在 where 子句中對字段進行表達式操作,這將導(dǎo)致引擎放棄使用索引而進行全表掃描。如:

select id from t where num/2 = 100

應(yīng)改為:

select id from t where num = 100*2

9.應(yīng)盡量避免在where子句中對字段進行函數(shù)操作,這將導(dǎo)致引擎放棄使用索引而進行全表掃描。如:

select id from t where substring(name,1,3) = ’abc’       -–name以abc開頭的id select id from t where datediff(day,createdate,’2005-11-30′) = 0    -–‘2005-11-30’    --生成的id

應(yīng)改為:

select id from t where name like 'abc%' select id from t where createdate >= '2005-11-30' and createdate < '2005-12-1'

10.不要在 where 子句中的“=”左邊進行函數(shù)、算術(shù)運算或其他表達式運算,否則系統(tǒng)將可能無法正確使用索引。

11.在使用索引字段作為條件時,如果該索引是復(fù)合索引,那么必須使用到該索引中的第一個字段作為條件時才能保證系統(tǒng)使用該索引,否則該索引將不會被使用,并且應(yīng)盡可能的讓字段順序與索引順序相一致。

12.不要寫一些沒有意義的查詢,如需要生成一個空表結(jié)構(gòu):

select col1,col2 into #t from t where 1=0

這類代碼不會返回任何結(jié)果集,但是會消耗系統(tǒng)資源的,應(yīng)改成這樣:

create table #t(…)

13.Update 語句,如果只更改1、2個字段,不要Update全部字段,否則頻繁調(diào)用會引起明顯的性能消耗,同時帶來大量日志。

14.對于多張大數(shù)據(jù)量(這里幾百條就算大了)的表JOIN,要先分頁再JOIN,否則邏輯讀會很高,性能很差。

15.select count(*) from table;這樣不帶任何條件的count會引起全表掃描,并且沒有任何業(yè)務(wù)意義,是一定要杜絕的。

16.索引并不是越多越好,索引固然可以提高相應(yīng)的 select 的效率,但同時也降低了 insert 及 update 的效率,因為 insert 或 update 時有可能會重建索引,所以怎樣建索引需要慎重考慮,視具體情況而定。一個表的索引數(shù)最好不要超過6個,若太多則應(yīng)考慮一些不常使用到的列上建的索引是否有 必要。

17.應(yīng)盡可能的避免更新 clustered 索引數(shù)據(jù)列,因為 clustered 索引數(shù)據(jù)列的順序就是表記錄的物理存儲順序,一旦該列值改變將導(dǎo)致整個表記錄的順序的調(diào)整,會耗費相當大的資源。若應(yīng)用系統(tǒng)需要頻繁更新 clustered 索引數(shù)據(jù)列,那么需要考慮是否應(yīng)將該索引建為 clustered 索引。

18.盡量使用數(shù)字型字段,若只含數(shù)值信息的字段盡量不要設(shè)計為字符型,這會降低查詢和連接的性能,并會增加存儲開銷。這是因為引擎在處理查詢和連 接時會逐個比較字符串中每一個字符,而對于數(shù)字型而言只需要比較一次就夠了。

19.盡可能的使用 varchar/nvarchar 代替 char/nchar ,因為首先變長字段存儲空間小,可以節(jié)省存儲空間,其次對于查詢來說,在一個相對較小的字段內(nèi)搜索效率顯然要高些。

20.任何地方都不要使用 select * from t ,用具體的字段列表代替“*”,不要返回用不到的任何字段

21.盡量使用表變量來代替臨時表。如果表變量包含大量數(shù)據(jù),請注意索引非常有限(只有主鍵索引)。

22. 避免頻繁創(chuàng)建和刪除臨時表,以減少系統(tǒng)表資源的消耗。臨時表并不是不可使用,適當?shù)厥褂盟鼈兛梢允鼓承├谈行В纾斝枰貜?fù)引用大型表或常用表中的某個數(shù)據(jù)集時。但是,對于一次性事件, 最好使用導(dǎo)出表。

23.在新建臨時表時,如果一次性插入數(shù)據(jù)量很大,那么可以使用 select into 代替 create table,避免造成大量 log ,以提高速度;如果數(shù)據(jù)量不大,為了緩和系統(tǒng)表的資源,應(yīng)先create table,然后insert。

24.如果使用到了臨時表,在存儲過程的最后務(wù)必將所有的臨時表顯式刪除,先 truncate table ,然后 drop table ,這樣可以避免系統(tǒng)表的較長時間鎖定。

25.盡量避免使用游標,因為游標的效率較差,如果游標操作的數(shù)據(jù)超過1萬行,那么就應(yīng)該考慮改寫。

26.使用基于游標的方法或臨時表方法之前,應(yīng)先尋找基于集的解決方案來解決問題,基于集的方法通常更有效。

27.與臨時表一樣,游標并不是不可使用。對小型數(shù)據(jù)集使用 FAST_FORWARD 游標通常要優(yōu)于其他逐行處理方法,尤其是在必須引用幾個表才能獲得所需的數(shù)據(jù)時。在結(jié)果集中包括“合計”的例程通常要比使用游標執(zhí)行的速度快。如果開發(fā)時 間允許,基于游標的方法和基于集的方法都可以嘗試一下,看哪一種方法的效果更好。

28.在所有的存儲過程和觸發(fā)器的開始處設(shè)置 SET NOCOUNT ON ,在結(jié)束時設(shè)置 SET NOCOUNT OFF 。無需在執(zhí)行存儲過程和觸發(fā)器的每個語句后向客戶端發(fā)送 DONE_IN_PROC 消息。

29.盡量避免大事務(wù)操作,提高系統(tǒng)并發(fā)能力。

30.盡量避免向客戶端返回大數(shù)據(jù)量,若數(shù)據(jù)量過大,應(yīng)該考慮相應(yīng)需求是否合理。

實際案例分析:拆分大的 DELETE 或INSERT 語句,批量提交SQL語句

如果你需要在一個在線的網(wǎng)站上去執(zhí)行一個大的 DELETE 或 INSERT 查詢,你需要非常小心,要避免你的操作讓你的整個網(wǎng)站停止相應(yīng)。因為這兩個操作是會鎖表的,表一鎖住了,別的操作都進不來了。

Apache 會有很多的子進程或線程。所以,其工作起來相當有效率,而我們的服務(wù)器也不希望有太多的子進程,線程和數(shù)據(jù)庫鏈接,這是極大的占服務(wù)器資源的事情,尤其是內(nèi)存。

如果你把你的表鎖上一段時間,比如30秒鐘,那么對于一個有很高訪問量的站點來說,這30秒所積累的訪問進程/線程,數(shù)據(jù)庫鏈接,打開的文件數(shù),可能不僅僅會讓你的WEB服務(wù)崩潰,還可能會讓你的整臺服務(wù)器馬上掛了。

所以,如果你有一個大的處理,你一定把其拆分,使用 LIMIT oracle(rownum),sqlserver(top)條件是一個好的方法。下面是一個mysql示例:

 

 
while(1){   //每次只做1000條   mysql_query(“delete from logs where log_date <= ’2012-11-01’ limit 1000”);   if(mysql_affected_rows() == 0){
//刪除完成,退出! break; } //每次暫停一段時間,釋放表讓其他進程/線程訪問。 usleep(50000) }


Mr.lu 2016-02-25 14:24 發(fā)表評論
]]>
獲取八位UUID標識碼http://www.aygfsteel.com/luyongfa/archive/2016/01/19/429112.htmlMr.luMr.luTue, 19 Jan 2016 07:17:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2016/01/19/429112.htmlhttp://www.aygfsteel.com/luyongfa/comments/429112.htmlhttp://www.aygfsteel.com/luyongfa/archive/2016/01/19/429112.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/429112.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/429112.html public static String[] chars = new String[]
      {
          "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
          "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
          "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"
      };

  public static String getShortUuid() {
    StringBuffer stringBuffer = new StringBuffer();
    String uuid = UUID.randomUUID().toString().replace("-", "");
    for (int i = 0; i < 8; i++) {
      String str = uuid.substring(i * 4, i * 4 + 4);
      int strInteger = Integer.parseInt(str, 16);
      stringBuffer.append(chars[strInteger % 0x3E]);
    }

    return stringBuffer.toString();
  }

Mr.lu 2016-01-19 15:17 發(fā)表評論
]]>
Java開發(fā)必會的Linux命令http://www.aygfsteel.com/luyongfa/archive/2015/12/25/428823.htmlMr.luMr.luFri, 25 Dec 2015 02:13:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2015/12/25/428823.htmlhttp://www.aygfsteel.com/luyongfa/comments/428823.htmlhttp://www.aygfsteel.com/luyongfa/archive/2015/12/25/428823.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/428823.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/428823.html本文并不會對所有命令進行詳細講解,只給出常見用法和解釋。具體用法可以使用--help查看幫助或者直接通過google搜索學(xué)習(xí)。

1.查找文件

find / -name filename.txt 根據(jù)名稱查找/目錄下的filename.txt文件。

find . -name "*.xml" 遞歸查找所有的xml文件

find . -name "*.xml" |xargs grep "hello world" 遞歸查找所有文件內(nèi)容中包含hello world的xml文件

grep -H 'spring' *.xml 查找所以有的包含spring的xml文件

find ./ -size 0 | xargs rm -f & 刪除文件大小為零的文件

ls -l | grep '.jar' 查找當前目錄中的所有jar文件

grep 'test' d* 顯示所有以d開頭的文件中包含test的行。

grep 'test' aa bb cc 顯示在aa,bb,cc文件中匹配test的行。

grep '[a-z]\{5\}' aa 顯示所有包含每個字符串至少有5個連續(xù)小寫字符的字符串的行。

2.查看一個程序是否運行

ps –ef|grep tomcat 查看所有有關(guān)tomcat的進程

3.終止線程

kill -9 19979 終止線程號位19979的進程

4.查看文件,包含隱藏文件

ls -al

5.當前工作目錄

pwd

6.復(fù)制文件

cp source dest 復(fù)制文件

cp -r sourceFolder targetFolder 遞歸復(fù)制整個文件夾

scp sourecFile romoteUserName@remoteIp:remoteAddr 遠程拷貝

7.創(chuàng)建目錄

mkdir newfolder

8.刪除目錄

rmdir deleteEmptyFolder 刪除空目錄 rm -rf deleteFile 遞歸刪除目錄中所有內(nèi)容

9.移動文件

mv /temp/movefile /targetFolder

10.重命令

mv oldNameFile newNameFile

11.切換用戶

su -username

12.修改文件權(quán)限

chmod 777 file.java //file.java的權(quán)限-rwxrwxrwx,r表示讀、w表示寫、x表示可執(zhí)行

13.壓縮文件

tar -czf test.tar.gz /test1 /test2

14.列出壓縮文件列表

tar -tzf test.tar.gz

15.解壓文件

tar -xvzf test.tar.gz

16.查看文件頭10行

head -n 10 example.txt

17.查看文件尾10行

tail -n 10 example.txt

18.查看日志類型文件

tail -f exmaple.log //這個命令會自動顯示新增內(nèi)容,屏幕只顯示10行內(nèi)容的(可設(shè)置)。

19.使用超級管理員身份執(zhí)行命令

sudo rm a.txt 使用管理員身份刪除文件

20.查看端口占用情況

netstat -tln | grep 8080 查看端口8080的使用情況

21.查看端口屬于哪個程序

lsof -i :8080

22.查看進程

ps aux|grep java 查看java進程

ps aux 查看所有進程

23.以樹狀圖列出目錄的內(nèi)容

tree a

ps:Mac下使用tree命令

24. 文件下載

wget http://file.tgz mac下安裝wget命令

curl http://file.tgz

25. 網(wǎng)絡(luò)檢測

ping www.just-ping.com

26.遠程登錄

ssh userName@ip

27.打印信息

echo $JAVA_HOME 打印java home環(huán)境變量的值

28.java 常用命令

java javac jps ,jstat ,jmapjstack

29.其他命令

svn git maven

28.linux命令學(xué)習(xí)網(wǎng)站:

http://explainshell.com/



Mr.lu 2015-12-25 10:13 發(fā)表評論
]]>
常用 Git 命令清單http://www.aygfsteel.com/luyongfa/archive/2015/12/21/428759.htmlMr.luMr.luMon, 21 Dec 2015 05:37:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2015/12/21/428759.htmlhttp://www.aygfsteel.com/luyongfa/comments/428759.htmlhttp://www.aygfsteel.com/luyongfa/archive/2015/12/21/428759.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/428759.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/428759.html閱讀全文

Mr.lu 2015-12-21 13:37 發(fā)表評論
]]>
Redis的Java客戶端Jedis的八種調(diào)用方式(事務(wù)、管道、分布式)介紹http://www.aygfsteel.com/luyongfa/archive/2015/04/03/424099.htmlMr.luMr.luFri, 03 Apr 2015 05:28:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2015/04/03/424099.htmlhttp://www.aygfsteel.com/luyongfa/comments/424099.htmlhttp://www.aygfsteel.com/luyongfa/archive/2015/04/03/424099.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/424099.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/424099.html閱讀全文

Mr.lu 2015-04-03 13:28 發(fā)表評論
]]>
bitbucket入門手冊,手把手操作指南http://www.aygfsteel.com/luyongfa/archive/2015/03/11/423365.htmlMr.luMr.luWed, 11 Mar 2015 02:40:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2015/03/11/423365.htmlhttp://www.aygfsteel.com/luyongfa/comments/423365.htmlhttp://www.aygfsteel.com/luyongfa/archive/2015/03/11/423365.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/423365.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/423365.htmlBitbucket使用說明:


使用者請直接看第一步,第二步和egit使用說明,


需要自己創(chuàng)建倉庫的可以看三四步


第一步:新用戶注冊www.bitbucket.org


 


然后按步驟創(chuàng)建一個教程代碼庫

 


可以選擇下載SourceTree git   SourceTree是一個客戶端,圖形界面,挺方便的

 

 

主界面有個教程,挺詳細的,可以看看

 

 


第二步:設(shè)置中文


點右上角的小人圖標,然后點擊“Manage account”

 

Account settings 里最下面有個選項,Language,改成Chinese


 


第三步:創(chuàng)建倉庫


  

  

 

 

創(chuàng)建完可以用SourceTree復(fù)制代碼進去,點擊用SourceTree克隆

  


會彈出這個窗口,可以更改目標路徑(必須是空文件夾,不存在的最好)

 

 

里面現(xiàn)在是空的,點擊在文件管理器中打開

 

 

把代碼復(fù)制到這個文件夾

 

然后查看SourceTree,里面就有未保存的文件(如果沒有,點擊下日志/歷史)點擊“未暫存的文件” 



就會變成“已暫存的文件” 

 


然后點擊工具欄的”提交”

 

 

輸入需要說明的文字,點擊提交

 

 

 

 

這時候你可以看到分支那里有了東西,不過這個時候還只是在你的本地

 

 

點擊推送,就會放到服務(wù)器上

 

 


 

點擊顯示完整輸出,可以看進度,如果變綠,出現(xiàn)執(zhí)行成功,就行了,文件多會稍微慢點

 

 

 

 

然后去網(wǎng)站,刷新一下頁面,就會出來信息

 

 

 

 

 


第四步:管理倉庫


源碼部分可以下載和查看源碼

 


 

提交部分可以查看提交記錄

 



 

點擊提交下面的藍字,可以查看這個版本修部分,每個變化文件都會顯示出來,紅色表示刪除代碼,綠表示添加代碼,十分方便查看這個版本更新了什么,

 

 

 

旁邊的通知圖標可以留言評論

 

 

 


第五步:代碼更新


代碼更新的一般步驟:克隆代碼——修改——提交——推送

Eclipse可以用egit方便完成,Qtgit工具,Vsgit插件,其他情況可以用sourceTree完成

具體的,可以查詢其他資料,因為我目前是用java,我會再寫一個egit的使用方法



Mr.lu 2015-03-11 10:40 發(fā)表評論
]]>
SQL關(guān)于分組合并字段解決方案http://www.aygfsteel.com/luyongfa/articles/421990.htmlMr.luMr.luWed, 31 Dec 2014 07:49:00 GMThttp://www.aygfsteel.com/luyongfa/articles/421990.htmlhttp://www.aygfsteel.com/luyongfa/comments/421990.htmlhttp://www.aygfsteel.com/luyongfa/articles/421990.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/421990.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/421990.html之前遇到分組后合并某字段得問題,我都會自己去寫個函數(shù)去實現(xiàn)。直至今天我才知道,原來各個數(shù)據(jù)庫都提供了相關(guān)的函數(shù),只是我不知道罷了。
mysql提供的函數(shù)功能最為強大,oracle和postgresql提供的函數(shù)只能實現(xiàn)單個字段合并

1.mysql:group_concat函數(shù),demo如下:
表數(shù)據(jù):

SQL:SELECT group_concat(name,',',remark order by id desc separator ';'FROM test group by age;
運行結(jié)果:


2.oracle:wmsys.wm_concat函數(shù),功能比較簡單,只能實現(xiàn)單字段間的合并,demo如下:
表數(shù)據(jù):


SQL:
SELECT DISTINCT
    wmsys.wm_concat (NAME) OVER (
        PARTITION BY AGE
        ORDER BY
            (SELECT 1 FROM dual)
    )
FROM
    (
        SELECT
            *
        FROM
            T_TEST
        ORDER BY
            ID DESC
    ) T
結(jié)果:


3.Postgresql:array_to_string以及string_agg兩個函數(shù)都能實現(xiàn),推薦string_agg,demo如下:
表數(shù)據(jù):

SQL:
     SELECT id,array_to_string(ARRAY(SELECT unnest(array_agg(name)) order by 1),';'FROM t_kenyon GROUP BY id ORDER BY id;

     SELECT id,string_agg(name,';'FROM t_kenyon GROUP BY id ORDER BY id;
結(jié)果:



Mr.lu 2014-12-31 15:49 發(fā)表評論
]]>
獲取ApplicationContexthttp://www.aygfsteel.com/luyongfa/archive/2014/12/26/421863.htmlMr.luMr.luFri, 26 Dec 2014 09:06:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2014/12/26/421863.htmlhttp://www.aygfsteel.com/luyongfa/comments/421863.htmlhttp://www.aygfsteel.com/luyongfa/archive/2014/12/26/421863.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/421863.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/421863.html一、簡單的用ApplicationContext做測試的話,獲得Spring中定義的Bean實例(對象).可以用:

ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
RegisterDAO registerDAO = (RegisterDAO)ac.getBean("RegisterDAO");

如果是兩個以上:
ApplicationContext ac = new ClassPathXmlApplicationContext(new String[]{"applicationContext.xml","dao.xml"});

或者用通配符:
ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:/*.xml");


二、ClassPathXmlApplicationContext[只能讀放在web-info/classes目錄下的配置文件]和FileSystemXmlApplicationContext的區(qū)別

classpath:前綴是不需要的,默認就是指項目的classpath路徑下面;
如果要使用絕對路徑,需要加上file:前綴表示這是絕對路徑;

對于FileSystemXmlApplicationContext:
默認表示的是兩種:

1.沒有盤符的是項目工作路徑,即項目的根目錄;
2.有盤符表示的是文件絕對路徑.

如果要使用classpath路徑,需要前綴classpath:

public class HelloClient {

  protected static final Log log = LogFactory.getLog(HelloClient.class);

  public static void main(String[] args) {
    // Resource resource = new ClassPathResource("appcontext.xml");
    // BeanFactory factory = new XmlBeanFactory(resource);

    // 用classpath路徑
    // ApplicationContext factory = new ClassPathXmlApplicationContext("classpath:appcontext.xml");
    // ApplicationContext factory = new ClassPathXmlApplicationContext("appcontext.xml");

    // ClassPathXmlApplicationContext使用了file前綴是可以使用絕對路徑的
    // ApplicationContext factory = new ClassPathXmlApplicationContext("file:F:/workspace/example/src/appcontext.xml");

    // 用文件系統(tǒng)的路徑,默認指項目的根路徑
    // ApplicationContext factory = new FileSystemXmlApplicationContext("src/appcontext.xml");
    // ApplicationContext factory = new FileSystemXmlApplicationContext("webRoot/WEB-INF/appcontext.xml");

    // 使用了classpath:前綴,這樣,FileSystemXmlApplicationContext也能夠讀取classpath下的相對路徑
    // ApplicationContext factory = new FileSystemXmlApplicationContext("classpath:appcontext.xml");
    // ApplicationContext factory = new FileSystemXmlApplicationContext("file:F:/workspace/example/src/appcontext.xml");

    // 不加file前綴
    ApplicationContext factory = new FileSystemXmlApplicationContext("F:/workspace/example/src/appcontext.xml");
    IHelloWorld hw = (IHelloWorld)factory.getBean("helloworldbean");
    log.info(hw.getContent("luoshifei"));
  }
}



Mr.lu 2014-12-26 17:06 發(fā)表評論
]]>
solr4刪除索引 http://www.aygfsteel.com/luyongfa/articles/413630.htmlMr.luMr.luTue, 13 May 2014 14:11:00 GMThttp://www.aygfsteel.com/luyongfa/articles/413630.htmlhttp://www.aygfsteel.com/luyongfa/comments/413630.htmlhttp://www.aygfsteel.com/luyongfa/articles/413630.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/413630.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/413630.html

通過web方式提交索引和刪除索引


Solr 刪除指定索引:
http://localhost:8081/solr/solrtest/update/?stream.body=solr123456&stream.contentType=text/xml;charset=utf-8&commit=true

 

Solr 刪除全部索引:http://localhost:8080/solr/update/?stream.body=*:*&stream.contentType=text/xml;charset=utf-8&commit=true

 



Mr.lu 2014-05-13 22:11 發(fā)表評論
]]>
SolrJ開發(fā)文檔 http://www.aygfsteel.com/luyongfa/articles/412776.htmlMr.luMr.luTue, 22 Apr 2014 02:40:00 GMThttp://www.aygfsteel.com/luyongfa/articles/412776.htmlhttp://www.aygfsteel.com/luyongfa/comments/412776.htmlhttp://www.aygfsteel.com/luyongfa/articles/412776.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/412776.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/412776.html閱讀全文

Mr.lu 2014-04-22 10:40 發(fā)表評論
]]>
ajax跨域請求http://www.aygfsteel.com/luyongfa/archive/2013/12/26/408047.htmlMr.luMr.luThu, 26 Dec 2013 01:24:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/12/26/408047.htmlhttp://www.aygfsteel.com/luyongfa/comments/408047.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/12/26/408047.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/408047.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/408047.html            type : "get",
            async:false,
            url : url,
            dataType : "jsonp",
            success : function(data){
                var param = data.status;
                if ("1" == param) {
                    window.location.reload();
                }
                alert(data.message);
            },
            error:function(){
                alert('操作失敗');
            }
        });


服務(wù)端:
      String cb = request.getParameter("callback");
            if (cb != null) {//如果是跨域
                StringBuffer sb = new StringBuffer(cb);
                sb.append("(");
                sb.append(result);
                sb.append(")");
            }

Mr.lu 2013-12-26 09:24 發(fā)表評論
]]>
Linux下Tomcat的啟動、關(guān)閉、殺死進程 http://www.aygfsteel.com/luyongfa/archive/2013/08/28/403399.htmlMr.luMr.luWed, 28 Aug 2013 05:14:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/08/28/403399.htmlhttp://www.aygfsteel.com/luyongfa/comments/403399.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/08/28/403399.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/403399.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/403399.html打開終端
cd /java/tomcat
#執(zhí)行
bin/startup.sh #啟動tomcat
bin/shutdown.sh #停止tomcat
tail -f logs/catalina.out #看tomcat的控制臺輸出;
 
#看是否已經(jīng)有tomcat在運行了
ps -ef |grep tomcat
#如果有,用kill;
kill -9 pid #pid 為相應(yīng)的進程號
 
例如 ps -ef |grep tomcat 輸出如下
sun 5144 1 0 10:21 pts/1 00:00:06 /java/jdk/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/java/tomcat/common/endorsed -classpath :/java/tomcat/bin/bootstrap.jar:/java/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/java/tomcat -Dcatalina.home=/java/tomcat -Djava.io.tmpdir=/java/tomcat/temp org.apache.catalina.startup.Bootstrap start
 
則 5144 就為進程號 pid = 5144
kill -9 5144 就可以徹底殺死tomcat
 
#直接查看指定端口的進程pid
netstat -anp|grep 9217
#結(jié)果為 tcp        0      0 :::9217                     :::*                        LISTEN      26127/java
#則26127為9217這個端口的tomcat進程的pid,然后就可以kill這個進程
kill -9 26127
#然后再啟動tomcat即可


Mr.lu 2013-08-28 13:14 發(fā)表評論
]]>
在CentOS6.3上如何用yum安裝nginxhttp://www.aygfsteel.com/luyongfa/archive/2013/08/28/403393.htmlMr.luMr.luWed, 28 Aug 2013 02:25:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/08/28/403393.htmlhttp://www.aygfsteel.com/luyongfa/comments/403393.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/08/28/403393.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/403393.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/403393.html默認的yum源比較老也不全,在update這的那的之后,還是沒有nginx的身影, 別折騰了, 標準包是沒有這玩意兒的。


    wget http://www.atomicorp.com/installers/atomic  #下載atomic yum源

    sh ./atomic   #安裝

    yum check-update  #更新yum軟件包

2、安裝nginx:


    yum install nginx      #安裝nginx,根據(jù)提示,輸入Y安裝即可成功安裝

    #修改配置文件,這里省略,主要是將目錄指定到 /home/ngmsw-files

    service nginx start    #啟動

    chkconfig  nginx on    #設(shè)為開機啟動


Mr.lu 2013-08-28 10:25 發(fā)表評論
]]>
在Centos下啟用mysql的遠程訪問賬號 http://www.aygfsteel.com/luyongfa/archive/2013/08/28/403389.htmlMr.luMr.luWed, 28 Aug 2013 02:10:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/08/28/403389.htmlhttp://www.aygfsteel.com/luyongfa/comments/403389.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/08/28/403389.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/403389.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/403389.html在默認情況下mysql是不允許遠程訪問的.

現(xiàn)在需要添加一個可以具有原創(chuàng)訪問的mysql賬號(需要進入mysql命令行下):

GRANT ALL PRIVILEGES ON *.* TO remote@"%" IDENTIFIED BY '遠程登錄的明文密碼' WITH GRANT OPTION;

執(zhí)行如下語句生效:

flush privileges;



Mr.lu 2013-08-28 10:10 發(fā)表評論
]]>
Linux下安裝jdk1.6 http://www.aygfsteel.com/luyongfa/archive/2013/08/27/403377.htmlMr.luMr.luTue, 27 Aug 2013 09:34:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/08/27/403377.htmlhttp://www.aygfsteel.com/luyongfa/comments/403377.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/08/27/403377.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/403377.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/403377.html一、安裝

創(chuàng)建安裝目錄,在/usr/java下建立安裝路徑,并將文件考到該路徑下: 

# mkdir /usr/java

 

1、jdk-6u11-linux-i586.bin 這個是自解壓的文件,在linux上安裝如下: 

# chmod 755 jdk-6u11-linux-i586.bin 

# ./jdk-6u11-linux-i586.bin (注意,這個步驟一定要在jdk-6u11-linux-i586.bin所在目錄下)

在按提示輸入yes后,jdk被解壓。

 出現(xiàn)一行字:Do you aggree to the above license terms? [yes or no]

  安裝程序在問您是否愿意遵守剛才看過的許可協(xié)議。當然要同意了,輸入"y" 或 "yes" 回車。

2、若是用jdk-6u11-linux-i586-rpm.bin 這個也是一個自解壓文件,不過解壓后的文件是jdk-6u11-linux-i586-rpm 包,執(zhí)行rpm命令裝到linux上就可以了。安裝如下: 

#chmod 755 ./jdk-6u11-linux-i586-rpm  

# ./jdk-6u11-linux-i586-rpm .bin 

# rpm -ivh jdk-6u11-linux-i586-rpm

 

出現(xiàn)一行字:Do you aggree to the above license terms? [yes or no]

  安裝程序在問您是否愿意遵守剛才看過的許可協(xié)議。當然要同意了,輸入"y" 或 "yes" 回車。

安裝軟件會將JDK自動安裝到 /usr/java/目錄下。 

二、配置
 #vi /etc/profile

  在里面添加如下內(nèi)容

export JAVA_HOME=/usr/java/jdk1.6.0_27

export JAVA_BIN=/usr/java/jdk1.6.0_27/bin

export PATH=$PATH:$JAVA_HOME/bin

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JAVA_HOME JAVA_BIN PATH CLASSPATH

讓/etc/profile文件修改后立即生效 ,可以使用如下命令:

 # .  /etc/profile

注意: . 和 /etc/profile 有空格.


 
重啟測試

  java -version

  屏幕輸出:

  java version "jdk1.6.0_02"
  Java(TM) 2 Runtime Environment, Standard Edition (build jdk1.6.0_02)
  Java HotSpot(TM) Client VM (build jdk1.6.0_02, mixed mode)



Mr.lu 2013-08-27 17:34 發(fā)表評論
]]>
Linux Tomcat安裝 http://www.aygfsteel.com/luyongfa/archive/2013/08/27/403376.htmlMr.luMr.luTue, 27 Aug 2013 09:33:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/08/27/403376.htmlhttp://www.aygfsteel.com/luyongfa/comments/403376.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/08/27/403376.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/403376.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/403376.html 

  為了學(xué)習(xí)java,需要一個服務(wù)器,因此決定用比較流行的tomcat。根據(jù)網(wǎng)上對安裝tomcat的介紹,自己進行了安裝,現(xiàn)在已經(jīng)成功了,現(xiàn)在把安裝的過程進行記錄,也供大家學(xué)習(xí)參考。
   一、從官方網(wǎng)站上下載tomcat軟件包。
    http:
//tomcat.apache.org/
   點擊左側(cè)的 download的一個版本,我選擇的是 tomcat6.x,你可以根據(jù)自己的實際情況進行選擇安裝,點擊超連接,選擇 Binary Distributions 下的tar.gz (pgp, md5) 壓縮包,進行下載
   二、下載到本地后,進行解壓

    #tar zxvf apach
-tomcat-6.0.16.tar.gz
    #mv apach
-tomcat-6.0.16 /usr/local

   三、進行tomcat環(huán)境的配置(前提需要安裝jdk)
    #vi 
/etc/profile 

    export JAVA_HOME
=/usr/local/jdk1.6.0_04
     export TOMCAT_HOME
=/usr/local/apach-tomcat-6.0.16
    
    保存退出 
       
    # source 
/etc/profile  //讓當前配置立即生效
    
    四、啟動tomcat服務(wù)器 
    $ 
/usr/local/apach-tomcat-6.0.16/bin/startup.sh 
    我的電腦上會出現(xiàn)如下內(nèi)容: 
    Using CATALINA_BASE:   
/usr/local/apache-tomcat-6.0.16
    Using CATALINA_HOME:   
/usr/local/apache-tomcat-6.0.16
    Using CATALINA_TMPDIR: 
/usr/local/apache-tomcat-6.0.16/temp
    Using JRE_HOME:       
/usr/local/jdk1.6.0_04
    五、在瀏覽器中輸入http:
//localhost:8080/就可以看到tomcat的log了
    tomcat的安裝到此結(jié)束。

 



Mr.lu 2013-08-27 17:33 發(fā)表評論
]]>
sql去重http://www.aygfsteel.com/luyongfa/archive/2013/08/27/403369.htmlMr.luMr.luTue, 27 Aug 2013 07:39:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/08/27/403369.htmlhttp://www.aygfsteel.com/luyongfa/comments/403369.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/08/27/403369.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/403369.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/403369.html
create table temp_dp_id_ent_info as select min(id) as id from dianping_deal_business group by deal_id,business_id having count(1)>1;
create table temp_dp_deal_id_ent_info as select deal_id from dianping_deal_business group by deal_id,business_id having count(1)>1;


delete from dianping_deal_business
where deal_id in (select deal_id from temp_dp_id_ent_info)
and id not in (select id from temp_dp_id_ent_info);

drop table temp_dp_id_ent_info;
drop table temp_dp_deal_id_ent_info;



Mr.lu 2013-08-27 15:39 發(fā)表評論
]]>
POI讀寫EXcelhttp://www.aygfsteel.com/luyongfa/archive/2013/08/22/403180.htmlMr.luMr.luThu, 22 Aug 2013 06:02:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/08/22/403180.htmlhttp://www.aygfsteel.com/luyongfa/comments/403180.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/08/22/403180.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/403180.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/403180.htmlpackage com.wo116114.action;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class TestReadAndWrite {
 public static void main(String[] args) throws IOException {
  String path = "D:/dianping/gather/";
  String fileName = "result";
  String fileType = "xlsx";
   writer(path, fileName, fileType);
  
  read(path, fileName, fileType);
 }

 private static void writer(String path, String fileName, String fileType)
   throws IOException {
  InputStream stream = new FileInputStream(path + fileName + "."
    + fileType);
  // 創(chuàng)建工作文檔對象
  Workbook wb = null;
  if (fileType.equals("xls")) {
   wb = new HSSFWorkbook(stream);
  } else if (fileType.equals("xlsx")) {
   wb = new XSSFWorkbook(stream);
  } else {
   System.out.println("您的文檔格式不正確!");
  }
  // 創(chuàng)建sheet對象
  Sheet sheet1 = (Sheet) wb.getSheetAt(0);
  // 循環(huán)寫入行數(shù)據(jù)
   int num = sheet1.getLastRowNum() + 1;
  for (int i = 0; i < 5; i++) {
   Row row = (Row) sheet1.createRow(num+i);
   // 循環(huán)寫入列數(shù)據(jù)
   for (int j = 0; j < 8; j++) {
    Cell cell = row.createCell(j);
    cell.setCellValue("測試" + j);
   }
  }
  File file = new File(path + fileName + "." + fileType);
  FileOutputStream fileOut = new FileOutputStream(file);
  wb.write(fileOut);
  fileOut.close();
  stream.close();
 }

 public static void read(String path, String fileName, String fileType)
   throws IOException {
  InputStream stream = new FileInputStream(path + fileName + "."
    + fileType);
  Workbook wb = null;
  if (fileType.equals("xls")) {
   wb = new HSSFWorkbook(stream);
  } else if (fileType.equals("xlsx")) {
   wb = new XSSFWorkbook(stream);
  } else {
   System.out.println("您輸入的excel格式不正確");
  }
  Sheet sheet1 = wb.getSheetAt(0);
  for (Row row : sheet1) {
   for (Cell cell : row) {
    System.out.print(cell.getStringCellValue() + "  ");
   }
   System.out.println();
  }
 }
}



Mr.lu 2013-08-22 14:02 發(fā)表評論
]]>
PostgreSQL數(shù)據(jù)庫切割和組合字段函數(shù)http://www.aygfsteel.com/luyongfa/archive/2013/05/15/399295.htmlMr.luMr.luWed, 15 May 2013 02:24:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/05/15/399295.htmlhttp://www.aygfsteel.com/luyongfa/comments/399295.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/05/15/399295.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/399295.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/399295.html1.concat
a.介紹
concat(str "any" [, str "any" [, ...]])

Concatenate all but first arguments with separators.
The first parameter is used as a separator. 
NULL arguments are ignored.
b.實際例子:
postgres=# create table t_kenyon(id int,name varchar(10),remark text);
CREATE TABLE
postgres=# insert into t_kenyon values(1,'test','kenyon'),(2,'just','china'),(3,'iam','lovingU');
INSERT 0 3
postgres=# insert into t_kenyon values(4,'test',null);
INSERT 0 1
postgres=# insert into t_kenyon values(5,null,'adele');
INSERT 0 1
postgres=# select * from t_kenyon;
 id | name | remark  
----+------+---------
  1 | test | kenyon
  2 | just | china
  3 | iam  | lovingU
  4 | test | 
  5 |      | adele
(5 rows)

postgres=# select concat(id,name,remark) from t_kenyon;
   concat    
-------------
 1testkenyon
 2justchina
 3iamlovingU
 4test
 5adele
(5 rows)
c.說明 concat函數(shù)純粹是一個拼接函數(shù),可以忽略null值拼接,拼接的值沒有分隔符,如果需要分割符,則需要用下面的函數(shù)concat_ws。

2.concat_ws
a.介紹
concat_ws(sep text, str "any" [, str "any" [,...] ])

Concatenate all but first arguments with separators.
The first parameter is used as a separator.
NULL arguments are ignored.
b.實際應(yīng)用
postgres=# select concat_ws(',',id,name,remark) from t_kenyon;
   concat_ws   
---------------
 1,test,kenyon
 2,just,china
 3,iam,lovingU
 4,test
 5,adele
(5 rows)

postgres=# select concat_ws('_',id,name,remark) from t_kenyon;
   concat_ws   
---------------
 1_test_kenyon
 2_just_china
 3_iam_lovingU
 4_test
 5_adele
(5 rows)

postgres=# select concat_ws('',id,name,remark) from t_kenyon;
  concat_ws  
-------------
 1testkenyon
 2justchina
 3iamlovingU
 4test
 5adele
(5 rows)

postgres=# select concat_ws('^_*',id,name,remark) from t_kenyon;
     concat_ws     
-------------------
 1^_*test^_*kenyon
 2^_*just^_*china
 3^_*iam^_*lovingU
 4^_*test
 5^_*adele
(5 rows)
c.說明 concat_ws函數(shù)比concat函數(shù)多了分隔符的功能,其實就是concat的升級版,假如分隔符為'',則取出來的結(jié)果和concat是一樣的。其功能與mysql中的group_concat函數(shù)比較類似,但也有不同,pg中concat_ws分隔符還支持多個字符作為分隔符的,日常用得更多的可能是||。 

二、切割函數(shù)
1.split_part
a.介紹
split_part(string text, delimiter text, field int)

Split string on delimiter and return the given field (counting from one)
b.實際例子
postgres=# select split_part('abc~@~def~@~ghi','~@~', 2);
 split_part 
------------
 def
(1 row)

postgres=# select split_part('now|year|month','|',3);
 split_part 
------------
 month
(1 row)
c.說明 該函數(shù)對按分隔符去取某個特定位置上的值非常有效果

2.regexp_split_to_table
a.介紹
regexp_split_to_table(string text, pattern text [, flags text])

Split string using a POSIX regular expression as the delimiter.
b.使用例子
postgres=# SELECT regexp_split_to_table('kenyon,love,,china,!',',');
 regexp_split_to_table 
-----------------------
 kenyon
 love
 
 china
 !
(5 rows)

--按分割符切割
postgres=# SELECT regexp_split_to_table('kenyon,china,loves',',');
 regexp_split_to_table 
-----------------------
 kenyon
 china
 loves
(3 rows)

--按字母切割
postgres=# SELECT regexp_split_to_table('kenyon,,china',E'\\s*');
 regexp_split_to_table 
-----------------------
 k
 e
 n
 y
 o
 n
 ,
 ,
 c
 h
 i
 n
 a
(13 rows)
3.regexp_split_to_array
a.介紹
regexp_split_to_array(string text, pattern text [, flags text ])

Split string using a POSIX regular expression as the delimiter.
b.實際例子
postgres=# SELECT regexp_split_to_array('kenyon,love,,china,!',',');
  regexp_split_to_array   
--------------------------
 {kenyon,love,"",china,!}
(1 row)

postgres=# SELECT regexp_split_to_array('kenyon,love,,china!','s*');
             regexp_split_to_array             
-----------------------------------------------
 {k,e,n,y,o,n,",",l,o,v,e,",",",",c,h,i,n,a,!}
(1 row)
c.說明
上面用到的flag里的s*表示split all

Mr.lu 2013-05-15 10:24 發(fā)表評論
]]>
將私有的jar包導(dǎo)入到maven本地庫http://www.aygfsteel.com/luyongfa/archive/2013/04/26/398425.htmlMr.luMr.luFri, 26 Apr 2013 03:15:00 GMThttp://www.aygfsteel.com/luyongfa/archive/2013/04/26/398425.htmlhttp://www.aygfsteel.com/luyongfa/comments/398425.htmlhttp://www.aygfsteel.com/luyongfa/archive/2013/04/26/398425.html#Feedback0http://www.aygfsteel.com/luyongfa/comments/commentRss/398425.htmlhttp://www.aygfsteel.com/luyongfa/services/trackbacks/398425.html將私有的jar包或者maven(http://maven.apache.org)找不到匹配的jar包,導(dǎo)入到本地庫中

 

mvn install:install-file -Dfile=d:/Downloads/apache-activemq-5.5.0/lib/activemq-core-5.5.0.jar -DgroupId=org.apache.activemq -DartifactId=activemq-core -Dversion=5.5.0 -Dpackaging=jar

 

 

解析:

mvn install:install-file  -Dfile=外部包的路徑 /  

                 -DgroupId=外部包的groupId /  

                 -DartifactId=外部包的artifactId /  

                 -Dversion=外部包的版本號 /  

                 -Dpackaging=jar



Mr.lu 2013-04-26 11:15 發(fā)表評論
]]>
主站蜘蛛池模板: 英山县| 大理市| 雷波县| 外汇| 乡宁县| 赤城县| 惠州市| 炉霍县| 吴忠市| 昌邑市| 南华县| 留坝县| 克什克腾旗| 印江| 鸡泽县| 右玉县| 交口县| 浮山县| 阜康市| 彭山县| 石门县| 厦门市| 烟台市| 阿克| 石屏县| 乐清市| 剑河县| 拜泉县| 贺州市| 宁陵县| 达孜县| 黄骅市| 乐山市| 聂拉木县| 河南省| 新蔡县| 绵阳市| 巫山县| 罗平县| 恩平市| 蓬安县|