Apache已經(jīng)發(fā)布了Struts2.0的正式版,即2.0.6GA版本。這個版本已經(jīng)可以在項(xiàng)目中正式使用了。當(dāng)然大家一定很關(guān)心,從webwork2.2遷移到struts2.0麻煩不麻煩,請看Struts2.0的FAQ:
引用
Essentially, Struts 2.0 is the technical equivalent of WebWork 2.3. Aside from the package and property renaming, it isn't much different than, say, migrating from WebWork 2.1 to 2.2.
Struts2.0其實(shí)就是webwork2.3而已,從webwork2.2遷移到struts2.0不會比從webwork2.1到2.2更麻煩。
webwork2.2和struts2.0差異對比:
http://struts.apache.org/2.x/docs/key-changes-from-webwork-2.html
遷移步驟:
http://struts.apache.org/2.x/docs/webwork-2-migration-strategies.html
總結(jié):
大致來說,struts2.0就是把package和配置文件的名字改了改而已,別的沒有做什么改動,所以現(xiàn)在用struts2.0和用webwork2.2沒有多大區(qū)別。當(dāng)然這遷移一遷就是將近兩年,還是有點(diǎn)進(jìn)步的:
1、搭配struts2.0的xwork版本必須使用xwork2.0.1,而xwork2.0.1集成了可選的Google Guice IoC容器
2、Struts2.0弄了一個plugin機(jī)制,來適配各種擴(kuò)展機(jī)制
3、全面引入annotation語法,驗(yàn)證,攔截都可以用annotation了。
所以用webwork的同志們,大膽的遷移到struts2.0來吧。