SpringApplication refreshContext
public class SpringApplication { public ConfigurableApplicationContext run(String... args) { //이전 코드 생략 //Context Refresh 단계 refreshContext(context); //이후 코드 생략 return cont...
public class SpringApplication { public ConfigurableApplicationContext run(String... args) { //이전 코드 생략 //Context Refresh 단계 refreshContext(context); //이후 코드 생략 return cont...
SpringApplication의 run 메소드는 아래의 세 종류가 있다. 하나씩 자세히 보도록 하자. public class SpringApplication { public ConfigurableApplicationContext run(String... args) { //1. 실행 시간 측정 시작 Startup startup = ...
서블릿을 관리해주는 컨테이너 서블릿을 만들었으면 서블릿을 관리해주는 것이 필요하다 서블릿이 어떤 역할을 수행하는 정의서라면, 서블릿 컨테이너는 그 정의서를 보고 수행한다고 생각하면 된다 클라이언트의 요청을 받아주고 응답을 할 수 있게 웹 서버와 소켓으로 통신한다 대표적으로 Tomc...
Toby-Spring 강의를 듣고 나서 SpringApplication이 어떻게 동작하는지 한 번 정리해자. 먼저 전체적인 코드는 위와 같다. public class TobySpringApplication { public static void main(String[] args) { GenericWebApplicationContext app...
클라이언트의 요청을 처리하고, 그 결과를 반환하는 Servlet 클래스의 구현 규칙을 지킨 자바 웹 프로그래밍 기술 자바를 사용하여 웹을 만들기 위해 필요한 기술 클라이언트가 어떠한 요청을 하면 그에 대한 결과를 다시 전송해주어야 하는데 이 역할을 하는 자바 프로그램 Servlet 특징 클라이언트 요청에 대해 동적으로 작...
SpringBootApplication.run 실제 SpringApplication 클래스의 코드는 너무 많으니 보고 싶은 run 메소드만 보자. public class SpringApplication { public static ConfigurableApplicationContext run(Class<?> primarySource...
@AliasFor에 정의된 애노테이션의 메타데이터 값을 가져오는 역할을 한다 @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @Documented public @interface AliasFor { @AliasFor("attribute") String value() ...
Inherited @Inherited 자식 클래스가 부모에 선언된 애노테이션을 같이 사용하고 싶을 때 선언한다 이 애노테이션의 주석을 해석하면 다음과 같다 Indicates that an annotation interface is automatically inherited. If an Inherited meta-annotation is...
@ComponentScan은 빈을 등록하기 위한 애노테이션들을 탐색하는 위치를 지정한다 @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented @Repeatable(ComponentScans.class) public @interface ComponentScan { ...
@Configuration의 하위 애노테이션으로 @Configuration과 동일한 역할을 수행한다 실제로 두 코드 사이에 별다른 차이가 없다 @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Configuration @Indexed public @inte...