springJDBCTemple能查詢不能更新
posted @ 2012-03-21 11:38 yita 閱讀(309) | 評論 (0) | 編輯 收藏
隨筆 - 16, 文章 - 0, 評論 - 0, 引用 - 0
|
springJDBCTemple能查詢不能更新
這個問題實在是太sui了,就因為不知道什么時候把dataSource的配置寫成<property name="defaultAutoCommit" value="false" />
所以,所以,,媽的,改true就好了。。。
posted @ 2012-03-21 11:38 yita 閱讀(309) | 評論 (0) | 編輯 收藏 mysql insert時報Duplicate entry...for key..
@import url(http://www.aygfsteel.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
Duplicate entry...for key..的意思時重復的鍵值,檢查主鍵或者其他唯一鍵值重復。
posted @ 2012-03-20 20:08 yita 閱讀(332) | 評論 (0) | 編輯 收藏 Install DB2 on LION先下載DB2 Express-c for mac 下載地址: https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=swg-db2expressc&S_PKG=dlmacosx&S_TACT=100KG31W&lang=en_US&cp=UTF-8
有兩個文件,一個是Express-C free db,一個是 Client。最好選擇直接下載而不要使用download director,ibm這個下載器真心一個爛。 下載的時候順手搜了下,stackoverflow上有說lion下安裝有問題,原因是db2setup無法正確識別出系統構架x86_64 解決方法是先使用uname -m 查系統構架。 再修改db2setup腳本如下 "Darwin") case ${OSM?} in i*86) INSTALLDIR="${PROGDIR?}/db2/macos/install" PLATNAME="MacOS" ;; x86_64) INSTALLDIR="${PROGDIR?}/db2/macos/install" PLATNAME="MacOS/x86_64" ;; esac ;; "HP-UX") 原文地址 http://stackoverflow.com/questions/7072871/how-do-i-install-ibm-db2-express-c-on-mac-os-x-10-7-lion 不過我下載下來的并沒有這個問題,i*86默認改為*86*了,不知道是我只安裝client還是ibm已經修正這個bug了?
但是安裝的時候亂碼,我就直接執行db2install,很快就安裝結束,提示
必須設置 DB2 實例環境 ,其方法是:在 sqllib 目錄中查找 db2profile 或 db2cshrc,也可以對 DB2 實例用戶打開新的登錄窗口。
未完待許。。
posted @ 2012-03-08 14:28 yita 閱讀(527) | 評論 (0) | 編輯 收藏 泛型方法public static <T> void add(Info<T> i1, Info<T> i2){
返回值前的<T>是泛型方法的聲明方式,不加編譯錯誤。
posted @ 2012-02-28 22:50 yita 閱讀(207) | 評論 (0) | 編輯 收藏 mac快捷鍵以及增加桌面
⌘=CMD;⌥=OPT;^=Ctrl;⇧=Shift; ⎋=Esc;⌫=Del
新增桌面 ,觸控板四指向下,或者按F3 打開Mission Control 點右上角點擊+號。
然后把不同程序按需要拖動到不同桌面即可。
mac里command與win得ctrl功能差不多。不少快捷鍵也相似可以嘗試。
posted @ 2012-02-13 11:23 yita 閱讀(2600) | 評論 (0) | 編輯 收藏 mac下使用eclipse的svn報錯問題Failed to load JavaHL Library. These are the errors that were encountered: no libsvnjavahl-1 in java.library.path no svnjavahl-1 in java.library.path no svnjavahl in java.library.path java.library.path = ******** eclipse裝好svn插件之后報加載JavaHL libary錯誤,看了一對說是要加參數指定 java.library.path。加了之后發現沒用,又搜了搜找到這個 http://subclipse.tigris.org/wiki/JavaHL 其中mac os 里有段寫到
于是在http://www.open.collab.net/downloads/community/下載之,下載需要先注冊,找到10.7版的。再開開eclipse,同步svn就沒有問題
ps.在sinaapp上看到介紹svnx這個客戶端,紀錄下,有時間試試 posted @ 2012-01-10 10:49 yita 閱讀(2041) | 評論 (0) | 編輯 收藏 Struts2 注解基礎The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location] 先是報這個錯,因為struts2的filter是*.action的原因。改為以下即可。 <filter-mapping>
1.convention plugin插件 convention plugin默認result頁面存放在WEB-INF/content.(可以通過struts.convention.result.path屬性來設置)。 如 http://localhost:8080/hello-world該url將訪問WEB-INF/content/hello-world.jsp。 2.convention plugin查找類的規則 convention plugin會查找struts、struts2、action、actions等包里的滿足以下條件的類(好像可以設置)
修改包查找規則修改下面兩個屬性
<constant name="struts.convention.package.locators" value="test" /> 3.convention plugin類對應URL規則 在struts、struts2、action、actions等包下生成“/”,更深層次則繼續以“包名/”,類名子目全小寫,按駝峰法分隔單詞添加“-”。舉例如下: com.example.actions.MainAction -> /main 4.result對應頁面名稱 頁面命名與類名規則相同,再加上“-”與result值即可,如果找不到result的頁面,似乎會返回到省略result名稱的頁面,還有success可省略,如下:
例子:foo action找不到result頁面,會自動查找foo-bar action package com.example.actions;
參考: struts2 convention-plugin文檔 http://www.vaannila.com/struts-2/struts-2-example/struts-2-annotation-example-1.html posted @ 2011-12-30 20:14 yita 閱讀(208) | 評論 (0) | 編輯 收藏 vim的一些配置。vimrc里加上下面代碼就可以ctrl+c、ctrl+v、ctrl+a等windows操作 1 source $VIMRUNTIME/mswin.vim
解決亂碼問題 " 設定默認解碼
最近用了這個vimrc( http://amix.dk/vim/vimrc.html),據說是最強配置,去了個command—T(要裝ruby),里面還有不少插件得自己找。看了下主要是python和js的配置,回頭得再加點java的。 順便得加上這個函數 fun! MySys() posted @ 2011-12-20 12:05 yita 閱讀(203) | 評論 (0) | 編輯 收藏 IE6的modaldialog里href運行javascript的錯誤解決方法IE6中用modaldialog時,a的href里寫javascript時,如<a href="javascript:test();">test</a>,如果無效或者出錯時,加上<base target="_self">即可。 posted @ 2011-12-19 20:33 yita 閱讀(180) | 評論 (0) | 編輯 收藏 |
|||||||||||||||||||||||||