Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. 준비하기

...

Info
title소스코드

https://github.com/swtest/spring-framework-example/tree/master/spring-framework-quick-start

2. 디펜던시 추가하기

Note
title주의사항

아래 예제는 스프링 프레임워크 4.3.1 버전임.

Maven
Gister macro
gistUrlhttps://gist.github.com/ChoiYoungMok/074cdebd59baa927b6c53dfcb28f3331

Gradle

Gister macro
gistUrlhttps://gist.github.com/ChoiYoungMok/40e3fedd9fd92f90e6d2eb17c3f930df

3. 소스코드 작성하기

hello/MessageService.java

Gister macro
gistUrlhttps://gist.github.com/ChoiYoungMok/1e3c34f44c1898265b0fcb642cc47b15

hello/MessagePrinter.java

Gister macro
gistUrlhttps://gist.github.com/ChoiYoungMok/81e0e529dd115658f6ac9b05ef0f7686

hello/Application.java

Gister macro
gistUrlhttps://gist.github.com/ChoiYoungMok/4ae344faca093819fe6feaeb6202e72c

4. 실행하기

hello/Application.java의 main 메서드 실행

Code Block
languagetext
title실행결과
Hello World!