23. Spring Application by ys

이 섹션에서는 스프링 부트에 대해 자세히 설명합니다. 여기에서 사용하고 사용자 지정할 수있는 주요 기능에 대해 배울 수 있습니다. 아직 그렇게하지 않았다면 " 제 2 부,시작하기" 및 "제 3 부, 스프링 부트 사용하기 "단원 을 읽고 기본적인 기초 지식을 얻을 수 있습니다.

SpringApplication클래스는 main()메소드에서 시작되는 Spring 애플리케이션을 부트스트랩하는 편리한 방법을 제공한다 . 다음 예제와 같이 많은 경우에 정적 SpringApplication.run메서드에 위임 할 수 있습니다 .

public  static  void main (String [] args) {
	SpringApplication.run (MySpringConfiguration. class , args);
}

부트스트랩(bootstrap) 또는 부트스트래핑은 "현재 상황에서 어떻게든 한다"는 이다. 또, 사물의 초기 단계에서 단순 요소로부터 복잡한 체계를 구축하는 과정을 가리키는 경우도 있다.

응용 프로그램이 시작되면 다음 출력과 비슷한 내용이 표시됩니다.

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

2013-07-31 00:08:16.117  INFO 56603 --- [           main] o.s.b.s.app.SampleApplication            : Starting SampleApplication v0.1.0 on mycomputer with PID 56603 (/apps/myapp.jar started by pwebb)
2013-07-31 00:08:16.166  INFO 56603 --- [           main] ationConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6e5a8246: startup date [Wed Jul 31 00:08:16 PDT 2013]; root of context hierarchy
2014-03-04 13:09:54.912  INFO 41370 --- [           main] .t.TomcatServletWebServerFactory : Server initialized with port: 8080
2014-03-04 13:09:56.501  INFO 41370 --- [           main] o.s.b.s.app.SampleApplication            : Started SampleApplication in 2.992 seconds (JVM running for 3.658)

기본적으로 INFO응용 프로그램을 시작한 사용자와 같은 관련 시작 정보를 비롯하여 로깅 메시지가 표시됩니다. INFO로그 레벨이 아닌 다른 로그 레벨이 필요한 경우, 26.4 절. "로그 레벨"에서 설명 된 것처럼 로그 레벨 을 설정할 수 있습니다 .

Last updated