O.S. WIN 8

Eclipse: luna

Maven : 3.3.3

Maven repository主要分為下列

1.本地(Local)

Codeless 發表在 痞客邦 留言(0) 人氣()


O.S. Windows 8

Eclipse Luna

JDK 1.8.0_101

Tomcat 8.0.22

Maven 3.3.9

Codeless 發表在 痞客邦 留言(0) 人氣()


針對不同Annotation提供了一些說明

@BeforeClass :- Run only 1 time before all the test cases of class. Can be used to initialize resources.

@AfterClass :- Run only 1 time after all the test cases of class. Can be used to clean up the resources.

@Before :- Run annotated method every time individual test case is executed but run before the test case.

@After :- Run annotated method every time individual test case is executed but run after the test case

Codeless 發表在 痞客邦 留言(0) 人氣()


作業環境:

O.S.: Windows 7

IDE: Eclipse Luna

安裝環境:

JDK:1.8

Codeless 發表在 痞客邦 留言(0) 人氣()


建立一個web專案archetypeArtifactId改為maven-archetype-webapp

mvn archetype:generate -DgroupId=com.example.Maven -DartifactId=HelloMaven -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

利用maven建立專案的樹狀圖如下:

利用maven package可以將專案打包成war檔

若想要加入spring framework可於pom.xml上做設定

Codeless 發表在 痞客邦 留言(0) 人氣()


作業環境:

O.S.: Windows 8

IDE: Eclipse Luna

安裝環境:

JDK:1.8

Codeless 發表在 痞客邦 留言(0) 人氣()


Spging mvc 可以針對簡單的form去處理(結合JSTL)。

web.xml

<display-name>Spring MVC Form Handling</display-name>
<session-config>
<session-timeout>

Codeless 發表在 痞客邦 留言(0) 人氣()

安裝環境

O.S.:Win7

JDK:1.8.0

Eclipse:Luna 4.4.1

Server:Tomcat 1.8

Codeless 發表在 痞客邦 留言(0) 人氣()

Spting2.5後就可以使用Annotation的部分,在使用上面(較容易)可以取代原先XML的設定,但若是遇上Annotation和XML衝突的時候,則會以XML為主。

  • Required (可使用在setter上)

Customer.java

Codeless 發表在 痞客邦 留言(0) 人氣()

Auto-wiring

config設定中autowire屬性可以依據當時的的狀況(no(預設)、byName、byType、constructor、autodetect)去自動綁定,而不需要去大量去撰寫的程式碼。

  • byName

Codeless 發表在 痞客邦 留言(0) 人氣()

注入除了一般型態外,也可針對Collection(List、Map、Set、Properties)進行注入。

Customer.java

package com.example ;
import java.util.List;
import java.util.Map;

Codeless 發表在 痞客邦 留言(0) 人氣()

一般物件與物件間會有所謂的相依性(dependency),例如教室相依於學生

package com.example;
public class Classroom {
private Student stu=null ;
public Classroom(){

Codeless 發表在 痞客邦 留言(0) 人氣()

1 2
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。