單獨(dú)使用Spring建立簡易開發(fā)框架(三)
Posted on 2007-09-11 19:06 匪客 閱讀(4123) 評(píng)論(0) 編輯 收藏 所屬分類: 開發(fā)技術(shù)4. 開發(fā)準(zhǔn)備
4.1. 開發(fā)工具
??
Java
編輯器
Intellij IDEA 6.0.5
、
Eclipse WTP 3.2
;
??
JDK5.0 Update 11
;
??
Web
服務(wù)器
Tomcat 5.5.20
;
??
數(shù)據(jù)庫
Oracle10g
;
4.2. 支撐庫文件
spring.jar |
spring |
jstl.jar
standard.jar |
Jstl 1.2 |
commons-io-
commons-fileupload-1.2.jar |
文件上傳組件
|
commons-logging-1.1.jar
log4j- |
日志組件
|
mail.jar
activation.jar |
郵件組件
|
quartz- |
時(shí)序調(diào)度組件
|
aspectjweaver.jar |
AOP
組件
|
commons-lang-2.3.jar |
Apache
公共包
|
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-httpclient- |
Httpclient
組件
|
4.3. 系統(tǒng)目錄結(jié)構(gòu)
路
?
徑
|
說
?
明
|
/ |
工程根目錄
|
/lib |
工程所用的庫文件目錄
|
/src |
源代碼目錄
|
/webapp |
站點(diǎn)根目錄
|
/webapp/css |
樣式表目錄
|
/webapp/images |
圖片目錄
|
/webapp/js |
Js
腳本目錄
|
/webapp/WEB-INF |
web.xml
等配置文件所在目錄
|
/webapp/WEB-INF/classes |
Class
所在目錄
|
/webapp/WEB-INF/jsp |
Jsp
文件存放目錄
|
/webapp/WEB-INF/lib |
jar
包目錄
|
/webapp/WEB-INF/logs |
程序日志目錄
|
/webapp/WEB-INF/temp |
臨時(shí)文件保存目錄
|
4.4. 配置開發(fā)環(huán)境
4.4.1 設(shè)置字符集
程序文件全部為
UTF-8
字符集,使用開發(fā)工具建立工程時(shí)需要修改工程的默認(rèn)字符集。
在
IDEA
中通過
Ctrl+Alt+S
快捷鍵打開設(shè)置窗口,選擇
IDE Settings
下面的
General
打開通用設(shè)置窗口,修改
File Encoding
下面的
Default encoding
為
UTF-8
,同時(shí)修改
Properties Files
下面的
Default encoding
為
UTF-8
。
在
Eclipse
中點(diǎn)擊菜單
Window-Preferences
打開參數(shù)設(shè)置窗口,選擇左側(cè)樹形節(jié)點(diǎn)
General-Workspace
,修改
Text File Encoding
為
UTF-8
。
如果需要使用已經(jīng)存在的源文件,使用
IDEA
建立同名新文件,然后
copy
原始文件內(nèi)容到新文件中,注意不要直接使用源文件,可能會(huì)產(chǎn)生亂碼問題。