스프링부트 프로젝트 boot1

1 개요[ | ]

SpringBoot boot1 프로젝트
스프링부트 boot1 프로젝트
스프링 스타터 프로젝트 boot1
  • SpringBoot 코어만 있는 프로젝트
  • 순수 Spring Starter Project 프로젝트
  • 추가모듈을 하나도 선택하지 않은 프로젝트

2 사전작업[ | ]

3 새 프로젝트[ | ]

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

4 실행 1[ | ]

  • Package Explorer --- boot1 우클릭 --- Run As --- Spring Boot App
  • 하단 Console 창 확인
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.3.5.RELEASE)

2016-05-30 17:03:39.474  INFO 9084 --- [           main] com.example.boot1.Boot1Application       : Starting Boot1Application on WIN-DBOPKTBU0KB with PID 9084 (D:\workspace-sts\boot1\target\classes started by jmnote in D:\workspace-sts\boot1)
2016-05-30 17:03:39.489  INFO 9084 --- [           main] com.example.boot1.Boot1Application       : No active profile set, falling back to default profiles: default
2016-05-30 17:03:39.552  INFO 9084 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@33b37288: startup date [Mon May 30 17:03:39 KST 2016]; root of context hierarchy
2016-05-30 17:03:40.347  INFO 9084 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2016-05-30 17:03:40.363  INFO 9084 --- [           main] com.example.boot1.Boot1Application       : Started Boot1Application in 1.217 seconds (JVM running for 2.463)
2016-05-30 17:03:40.378  INFO 9084 --- [       Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@33b37288: startup date [Mon May 30 17:03:39 KST 2016]; root of context hierarchy
2016-05-30 17:03:40.378  INFO 9084 --- [       Thread-1] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

5 Boot1Application 수정[ | ]

  • "Package Explorer" 영역의 boot1 --- src/main/java --- com.example.boot1 --- Boot1Application.java 더블클릭
  • 아래와 같이 내용 추가
package com.example.boot1;

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

@SpringBootApplication
public class Boot1Application {

	public static void main(String[] args) {
		SpringApplication.run(Boot1Application.class, args);
		System.out.println("==== 안녕하세요 ====");
	}
}

6 실행 2[ | ]

  • 상단의 빨간 시작 버튼(▶)을 눌러 앱 시작
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.3.5.RELEASE)

2016-05-30 17:04:59.050  INFO 8256 --- [           main] com.example.boot1.Boot1Application       : Starting Boot1Application on WIN-DBOPKTBU0KB with PID 8256 (D:\workspace-sts\boot1\target\classes started by jmnote in D:\workspace-sts\boot1)
2016-05-30 17:04:59.050  INFO 8256 --- [           main] com.example.boot1.Boot1Application       : No active profile set, falling back to default profiles: default
2016-05-30 17:04:59.128  INFO 8256 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@33b37288: startup date [Mon May 30 17:04:59 KST 2016]; root of context hierarchy
2016-05-30 17:04:59.986  INFO 8256 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2016-05-30 17:05:00.007  INFO 8256 --- [           main] com.example.boot1.Boot1Application       : Started Boot1Application in 1.316 seconds (JVM running for 2.485)
==== 안녕하세요 ====
2016-05-30 17:05:00.007  INFO 8256 --- [       Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@33b37288: startup date [Mon May 30 17:04:59 KST 2016]; root of context hierarchy
2016-05-30 17:05:00.007  INFO 8256 --- [       Thread-1] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

7 같이 보기[ | ]

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