"스프링 스타터 프로젝트 HelloWorld"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 2명의 중간 판 2개는 보이지 않습니다)
12번째 줄: 12번째 줄:
* ▶ 버튼 클릭
* ▶ 버튼 클릭
* "Run As" --- Spring Boot App 선택 --- OK
* "Run As" --- Spring Boot App 선택 --- OK
<source lang='text'>
<syntaxhighlight lang='text'>
   .  ____          _            __ _ _
   .  ____          _            __ _ _
  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
28번째 줄: 28번째 줄:
2017-05-08 10:27:06.610  INFO 3732 --- [      Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4d826d77: startup date [Mon May 08 10:27:05 KST 2017]; root of context hierarchy
2017-05-08 10:27:06.610  INFO 3732 --- [      Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4d826d77: startup date [Mon May 08 10:27:05 KST 2017]; root of context hierarchy
2017-05-08 10:27:06.613  INFO 3732 --- [      Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2017-05-08 10:27:06.613  INFO 3732 --- [      Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
</source>
</syntaxhighlight>


==HelloWorldApplication.java 수정==
==HelloWorldApplication.java 수정==
<source lang='java' highlight='11'>
<syntaxhighlight lang='java' highlight='11'>
package com.example;
package com.example;


45번째 줄: 45번째 줄:
}
}
}
}
</source>
</syntaxhighlight>
:→ Hello, World! 출력
:→ Hello, World! 출력


==실행 2==
==실행 2==
<source lang='text' highlight='14'>
<syntaxhighlight lang='text' highlight='14'>
   .  ____          _            __ _ _
   .  ____          _            __ _ _
  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
66번째 줄: 66번째 줄:
2017-05-08 10:29:56.651  INFO 3960 --- [      Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4d826d77: startup date [Mon May 08 10:29:55 KST 2017]; root of context hierarchy
2017-05-08 10:29:56.651  INFO 3960 --- [      Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4d826d77: startup date [Mon May 08 10:29:55 KST 2017]; root of context hierarchy
2017-05-08 10:29:56.651  INFO 3960 --- [      Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2017-05-08 10:29:56.651  INFO 3960 --- [      Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[스프링 스타터 프로젝트 HelloWorld jar 파일 내보내기]]
* [[스프링 스타터 프로젝트 HelloWorld jar 파일 내보내기]]
* [[스프링 스타터 프로젝트 HelloWorld GitHub 올리기]]
* [[스프링 스타터 프로젝트 HelloWorld GitHub 올리기]]
* [[STS 메이븐 프로젝트 jar 패키지 빌드]]
* [[스프링 스타터 프로젝트 demo]]
* [[스프링 스타터 프로젝트 demo]]
* [[스프링 스타터 프로젝트 bootweb1]]
* [[스프링 스타터 프로젝트 bootweb1]]
76번째 줄: 77번째 줄:
* [[HelloWorldPlus.jar]]
* [[HelloWorldPlus.jar]]


[[분류: Spring Starter Project]]
[[분류:스프링 스타터 프로젝트]]

2020년 11월 2일 (월) 02:50 기준 최신판

1 개요[ | ]

Spring Starter Project HelloWorld
스프링 스타터 프로젝트 HelloWorld
  • CLI 상에서 Hello World 출력
  • jar로 추출하여 다른 컴퓨터에서 STS 없이 단독으로 실행가능하도록 해보자.

2 새 프로젝트[ | ]

  • Package Explorer의 빈공간에서 우클릭 --- New --- Spring Starter Project
  • "New Spring Starter Project" --- Name: HelloWorld --- [Next >] --- [Finish]

3 실행[ | ]

  • ▶ 버튼 클릭
  • "Run As" --- Spring Boot App 선택 --- OK
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.3.RELEASE)

2017-05-08 10:27:05.588  INFO 3732 --- [           main] com.example.HelloWorldApplication        : Starting HelloWorldApplication on WIN-QAWM7YG1SGO with PID 3732 (D:\workspace-sts\HelloWorld\target\classes started by user2 in D:\workspace-sts\HelloWorld)
2017-05-08 10:27:05.598  INFO 3732 --- [           main] com.example.HelloWorldApplication        : No active profile set, falling back to default profiles: default
2017-05-08 10:27:05.707  INFO 3732 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4d826d77: startup date [Mon May 08 10:27:05 KST 2017]; root of context hierarchy
2017-05-08 10:27:06.583  INFO 3732 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-05-08 10:27:06.598  INFO 3732 --- [           main] com.example.HelloWorldApplication        : Started HelloWorldApplication in 1.422 seconds (JVM running for 2.281)
2017-05-08 10:27:06.610  INFO 3732 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4d826d77: startup date [Mon May 08 10:27:05 KST 2017]; root of context hierarchy
2017-05-08 10:27:06.613  INFO 3732 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

4 HelloWorldApplication.java 수정[ | ]

package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class HelloWorldApplication {

	public static void main(String[] args) {
		SpringApplication.run(HelloWorldApplication.class, args);
		System.out.println( "Hello, World!" );
	}
}
→ Hello, World! 출력

5 실행 2[ | ]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.3.RELEASE)

2017-05-08 10:29:55.597  INFO 3960 --- [           main] com.example.HelloWorldApplication        : Starting HelloWorldApplication on WIN-QAWM7YG1SGO with PID 3960 (D:\workspace-sts\HelloWorld\target\classes started by user2 in D:\workspace-sts\HelloWorld)
2017-05-08 10:29:55.597  INFO 3960 --- [           main] com.example.HelloWorldApplication        : No active profile set, falling back to default profiles: default
2017-05-08 10:29:55.785  INFO 3960 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4d826d77: startup date [Mon May 08 10:29:55 KST 2017]; root of context hierarchy
2017-05-08 10:29:56.628  INFO 3960 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-05-08 10:29:56.644  INFO 3960 --- [           main] com.example.HelloWorldApplication        : Started HelloWorldApplication in 1.422 seconds (JVM running for 2.285)
Hello, World!
2017-05-08 10:29:56.651  INFO 3960 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4d826d77: startup date [Mon May 08 10:29:55 KST 2017]; root of context hierarchy
2017-05-08 10:29:56.651  INFO 3960 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

6 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}