2015年5月12日 星期二

[Java] 如何將陣列 Array 輸入至 Stored Procedure 當中

 

有一個 Stored Procedure 為 SP_COUNT_WHICH 其輸入參數有字串及陣列,下面的範例就是可以讓使用者將陣列資料利用 Java Code 傳入到該 Stored Procedure。

2015年5月8日 星期五

(溫故知新) SpringMVC 簡易練習(查找資料) easy 1

(溫故知新) SpringMVC 簡易練習(查找資料) easy 1

原始碼下載:https://goo.gl/7fEXBV

【開發環境】

Tomcat 7

MySQL

【開發工具】

Intellij IDEA 14

2015年5月5日 星期二

[ERROR] intellij idea Error:java: javacTask: source release 1.6 requires target release 1.6

在使用 IDEA 的過程中,可能會出現諸如:

Error:java: javacTask: source release 1.6 requires target release 1.6

Error:java: javacTask: source release 1.X requires target release 1.X

等錯誤,表示您目標輸出的版本不符合,若您使用的是 Maven 來管理方案,可以使用指定 compiler 的方式來解決

如在 pom.xml 中加上:

<build>
<finalName>TestSpringMVC_013</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>

</build>
其他參考解決方式:
IntelliJ IDEA Tip: source release 1.6 requires target release 1.6
IDEA: javac: source release 1.7 requires target release 1.7

2015年4月21日 星期二

[Struts2]取得 request,session,application 的方式

原始碼下載: http://goo.gl/JucNB9

主要有四種方式:

第一種 取得 Map 類型的資料,使用 ActionContext.getContext().getXXX()
第二種 取得 Map 類型的資料,使用 xxxAware
第三種 取得HtteServletRequest,HttpSession,ServletContext類型
第四種 取得HtteServletRequest,HttpSession,ServletContext類型,使用 ServletRequestAware

Related Posts Plugin for WordPress, Blogger...