O.S. WIN 8
Eclipse: luna
Maven : 3.3.3
Maven repository主要分為下列
1.本地Local
預設是存在USER.m2/repository內,當然可以修改下載的路徑可去%M2_HOME%conf中的setting.xml去進行修改
2.中央倉庫ce
- 8月 13 週六 201614:28
Maven repository 概念
- 8月 07 週日 201615:52
Eclipse內建立Maven project
O.S. Windows 8
Eclipse Luna
JDK 1.8.0_101
Tomcat 8.0.22
Maven 3.3.9
File New Maven Project
選擇Artifact Id 為maven-archetype-webapp
輸入相關Group Id和Artifa
- 6月 22 週一 201517:02
Junit Annotation的應用
針對不同Annotation提供了一些說明
@BeforeClass :- Run only 1 time before all the test cases of class. Can be used to initialize resources.
@AfterClass :- Run only
- 6月 22 週一 201516:57
Junit 環境設定與安裝
作業環境:
O.S.: Windows 7
IDE: Eclipse Luna
安裝環境:
JDK:1.8
Junit:4
Junit套件可以使得專案開發完成後可以做單元測試
點選專案右鍵 Properties Java Build Path Add Library Junit Junit
- 6月 21 週日 201522:07
Web Project with Spring
建立一個web專案archetypeArtifactId改為maven-archetype-webapp
mvn archetype:generate -DgroupId=com.example.Maven -DartifactId=HelloMaven -DarchetypeArtifactId=
- 6月 21 週日 201511:16
Maven 環境設定與安裝
作業環境:
O.S.: Windows 8
IDE: Eclipse Luna
安裝環境:
JDK:1.8
Apache Maven:3.3.3
下載位置:
Maven:
設定系統變數和path
M3_HOME=C:Program Filesapache-maven-3.3.3
若沒問題,跑出結果如
- 6月 18 週四 201511:07
Sprng Form Handling
Spging mvc 可以針對簡單的form去處理結合JSTL
web.xml
Spring MVC Form Handling
30
HelloWeb
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
/
- 6月 15 週一 201510:22
Spring MVC
安裝環境
O.S.:Win7
JDK:1.8.0
Eclipse:Luna 4.4.1
Server:Tomcat 1.8
寫第一支Spring mvc程式,先將common-logging.jar和spring.jar放置在WEB/INF/lib下
Spring mvc的架構controller的
- 6月 15 週一 201510:11
Annotation
Spting2.5後就可以使用Annotation的部分,在使用上面較容易可以取代原先XML的設定,但若是遇上Annotation和XML衝突的時候,則會以XML為主
Required 可使用在setter上
Customer.java
package com.example ;
public cl
- 6月 15 週一 201509:56
Auto-wiring
Auto-wiring
config設定中autowire屬性可以依據當時的的狀況no預設byNamebyTypeconstructorautodetect去自動綁定,而不需要去大量去撰寫的程式碼
byName
Customer.java
package com.example;
public cl