- Spring : Java Framework
- Spring Social : Social Login (facebook)
- Spring Mobile : Spring Mobile MVC
- Mybatis : SQL mapping Framework
- Ehcache : cache Framework
- Maven : Build & Dependency Management
- Bootstrap : CSS Framework
- Tiles2 : JSP Layout Framework
- Selenium : Automatic Web Browser Test Framework
- JUnit : Java Test Framework
- Mockito : Mocking Framework
- MoreUnit : Code, Test Code ์ด๋ ํด
- Emma : Code Coverage ๊ฒ์ฌ ํด (eclipse)
- Cobertura : Code Coverage ๊ฒ์ฌ ํด (jenkins)
- Checkstyle : Coding Convention ๊ฒ์ฌ ํด
- FindBugs : ์ฝ๋ ์ ์ ๋ถ์ ํด
์ค์นํ๊ธฐ
$ yum install java-1.6.0-openjdk.x86_64 java-1.6.0-openjdk-devel.x86_64
์ฐธ๊ณ : http://www.oracle.com/technetwork/java/javaee/downloads/index.html
์ค์นํ๊ธฐ
$ yum install mysql-server
์ฐธ๊ณ : http://dev.mysql.com/downloads/mysql
์์ํ๊ธฐ
$ service mysqld start
๊ธฐ๋ณธ DB, Table ์์ฑํ๊ธฐ
$ mysql -u root < src/main/db/create.sql
์ค์นํ๊ธฐ
http://www.springsource.org/downloads/sts
์ค์นํ๊ธฐ
http://maven.apache.org/download.html
์ค์นํ๊ธฐ
http://projectlombok.org/mavenrepo/index.html
STS์ File > Import > Projects from Git > URI ์ ํ ํ ์๋ ์ค์ ๊ฐ์ ์ ๋ ฅํ๋ค.
URI : ssh://git@github.com:[ID]/template.git
Host : github.com
Repository path : [ID]/template.git
Protocol : ssh
Port : ์์
User : git
Password : ์์
Import existing projects ์ No projects found ๋ผ๋ ์๋ฌ๊ฐ ๋ฐ์ํ๋ฉด ์๋ ๋จ๊ณ๋ฅผ ์ํ ํ ๋ค์ ์๋ํ๋ค.
Package Explorer์์ template ์ฐํด๋ฆญ > Configure > Convert To Maven Project๋ฅผ ์ํํ์ฌ maven project๋ก ์์ฑํ๋ค.
๋ค์ด๋ก๋ ๋ฐ์์ง template project์์ ๊ฒฝ๋ก์์ ์๋์ ๊ฐ์ด ์ ๋ ฅํ์ฌ eclipse project๋ฅผ ์์ฑํ๋ค.
$ mvn eclipse:eclipse
Selenium ํ ์คํธ๋ฅผ ์ํด ์๋ ๋ธ๋ผ์ฐ์ ์ค์นํ๋ค.
- Internet Explorer
- Chrome
- Firefox
- STS > Help > Install New Software... ํด๋ฆญ ํ work with์ ์ค์นํ๊ณ ์ plugin URL์ ์ ๋ ฅํ๋ค.
MoreUnit : http://moreunit.sourceforge.net/update-site
Ctrl + j : ๊ตฌํ ์ฝ๋์ ํ
์คํธ ์ฝ๋ ๊ฐ ์ด๋ํ๋ค.
Ctrl + r : ๊ตฌํ ์ฝ๋์์ ํ
์คํธ์ฝ๋๋ฅผ ์ํํ๋ค.
Checkstyle : http://eclipse-cs.sf.net/update
-
Checkstyle ํ์ฑํ
ํ๋ก์ ํธ ์ด๋ฆ์ ์ฐํด๋ฆญ ํ Checkstyle > Activate Checkstyle -
View
Window > Show View > Others > Checkstyle > Checkstyle violations
Emma : http://update.eclemma.org/
-
์ปค๋ฒ๋ฆฌ์ง ๊ฒ์ฌ
ํ๋ก์ ํธ ์ด๋ฆ์ ์ฐํด๋ฆญ ํ Coverage As > Junit Test ์ํ ํ ์๋ view์์ ๊ฒฐ๊ณผ ํ์ธํ๋ค. -
View
Window > Show View > Others > Java > Coverage
FindBugs : http://findbugs.cs.umd.edu/eclipse
-
์ ์ ๋ถ์
ํ๋ก์ ํธ ๋ช ์ฐํด๋ฆญ > Find bugs > Find bugs ์ํ ํ ์๋ view์์ ๊ฒฐ๊ณผ ํ์ธํ๋ค. -
View
Window > Show View > Find Bugs > Bug Explorer
- Preference > Java > Code Style > Formatter > New > Java Convention๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๊ธฐ๋ณธ ํ ํ๋ฆฟ ์์ฑํ๋ค.
Preference > Checkstyle > New ์ ํํ์ฌ ์๋ ์ค์ ๋๋ก ์ ๋ ฅํ๋ค.
Type : External Configuration File
Name : tinyCheckstyle
Location : tinyCheckstyle.xml
- Preference > Java > Code Style > Formatter > Edit > Line Wrapping > Maximum line width : 120
- Preference > XML > XML Files > Editor > Line width : 120
- Preference > Web > JSP Files > Editor > Line Width : 120
- Preference > Java > Code Style > Formatter > edit > Indentation > 4
- Preference > Java > Code Style > Formatter > edit > Indentation > Tab policy > Tabs only
- Preference > Web > CSS Files > Encoding : ISO 10646/Unicode(UTF-8)
- Preference > Web > HTML Files > Encoding : ISO 10646/Unicode(UTF-8)
- Preference > Web > JSP Files > Encoding : ISO 10646/Unicode(UTF-8)
- Preference > General > Content Types > Text > Java Properties Files > *.properties > UTF-8์ ์ ํ ํ Update
- Preference > General > Workspace > New text file line delimiter : Unix
- Preferences/General/Editors/File Associations/*.md ํ์ผ์ Text Editor ์ถ๊ฐํ๋ค.
Preference > Java > Editor > Templates > New Type์ ํด๋ฆญ ํ ์๋ ๋ด์ฉ ์ถ๊ฐํ๋ค.
name : ti
context : java
description : ti ์
๋ ฅ ํ Ctrl + Space ์
๋ ฅ ์ ์๋ package๊ฐ ์๋ import
pattern :
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.junit.matchers.JUnitMatchers.*;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.*;
- Preference > Java > Code Style > Organize Imports > Number of static imports๋ฅผ 1๋ก ์ค์ ํ๋ค.
STS์์ local ์ค์ ์ ์ ์ฉํ๊ธฐ ์ํด ๋ค์๊ณผ ๊ฐ์ด ์ค์ ํ๋ค.
Project Properties > Java Build Path > Order and Export ์์ ์๋์ ๊ฐ์ ์์๋ก ์ค์ ๋ณ๊ฒฝํ๋ค.
src/main/java
src/main/resources
src/main/resources-local
src/main/resources-dev
src/main/resources-release
์ค์นํ๊ธฐ
$ yum install tomcat6-webapps tomcat6-admin-webapps
์์ํ๊ธฐ
$ service tomcat6 start
mvn์ผ๋ก tomcat์ ๋ฐฐํฌํ๊ธฐ ์ํด์ /usr/share/tomcat6/conf/tomcat-users.conf ํ์ผ์ ์๋ ๋ด์ฉ ์ถ๊ฐํ๋ค.
<tomcat-users>
<role rolename="manager"/>
<user username="admin" password="" roles="manager"/>
</tomcat-users>
UTF-8์ ์ง์ํ๊ธฐ ์ํด ์๋ ๋ด์ฉ ์ค ๊ฐ์ฅ ์๋ ์ค์ ์ถ๊ฐํ๋ค.
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
URIEncoding="UTF-8" />
pom.xml ํ์ผ์ AWS ๋ฐฐํฌ ์๋ฒ IP ์ค์
!-- mvn tomcat:deploy ๋ฐฐํฌ ๊ฐ๋ฅ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>${tomcat-maven-plugin.version}</version>
<configuration>
<url>http://54.248.89.221:8080/manager</url>
<path>/ROOT</path>
</configuration>
</plugin>
์ต์ด ๋ฐฐํฌ ์ ์๋ ๋ช ๋ น์ด๋ฅผ ์ด์ฉํ๋ค.
mvn tomcat:deploy
์ต์ด ๋ฐฐํฌ๊ฐ ์๋ ๊ฒฝ์ฐ ์๋ ๋ช ๋ น์ด๋ฅผ ์ด์ฉํ๋ค.
mvn tomcat:undeploy tomcat:deploy
/usr/share/tomcat6/webapps์ root๊ถํ์ด ํ์ํ ํด๋์ ssh๋ก WARํ์ผ์ ๋ฐฐํฌํ๊ธฐ ์ํ์ฌ ์๋ ๋ถ๋ถ ์์ ํ์ํ๋ค.
/etc/sudoers ํ์ผ์ ์๋ ๋ถ๋ถ ์ฃผ์ ์ฒ๋ฆฌํ๋ค.
Defaults requiretty
