Giter Site home page Giter Site logo

spring-mvc-study's Introduction

Spring MVC Study

๐Ÿ“– Learning DispatcherServlet initialization & service process

Spring Version: 4.3.3
Build tool: Gradle

Study Database

DispatcherServlet ์˜ ๊ตฌ์กฐ
  • Servlet ์ƒ์† ๊ตฌ์กฐ

    • [Spring] DispatcherServlet : doDispatcher ๋ฉ”์„œ๋“œ๋ฅผ ์ด์šฉํ•ด web request ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ์ค‘์•™ ์ฒ˜๋ฆฌ ํด๋ž˜์Šค
    • [Spring] FrameworkServlet : ์„œ๋ธ”๋ฆฟ ์›น ํ”„๋ ˆ์ž„์›Œํฌ์˜ ๊ธฐ๋ณธ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๊ณ  do* ๋ฉ”์„œ๋“œ๋ฅผ ๋‹ค์‹œ doService ๋ฉ”์„œ๋“œ๋กœ ๋ชจ์•„์ฃผ๋Š” ์ถ”์ƒํด๋ž˜์Šค
    • [Spring] HttpServletBean : init ๋ฉ”์„œ๋“œ๋ฅผ ์žฌ์ •์˜ํ•˜๋ฉฐ ์„ค์ • ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๋Š” ์ถ”์ƒ ํด๋ž˜์Šค
    • [Servlet] HttpServlet : service ๋ฉ”์„œ๋“œ๋กœ์˜ ์š”์ฒญ์„ do* ๋ฉ”์„œ๋“œ๋กœ ์ „๋‹ฌํ•˜๋Š” ์ถ”์ƒํด๋ž˜์Šค
    • [Servlet] GenericServlet : ServletConfig ์˜ ์„ค์ •์„ ๋‹ด๋‹นํ•˜๋Š” ์ถ”์ƒํด๋ž˜์Šค
    • [Servlet] Servlet(interface) : Servlet ์˜ ์ƒ๋ช…์ฃผ๊ธฐ๋ฅผ ์ œ๊ณตํ•˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค (init, service, destroy)
  • ApplicationContext ๊ตฌ์„ฑ ๋ฐ ์ดˆ๊ธฐํ™”

    • ApplicationContext ์ƒ์„ฑ: FrameworkServlet#createWebApplicationContext()
    • BeanFactory ์ƒ์„ฑ: AbstractRefreshableApplicationContext#refreshBeanFactory()
    • BeanDefinition ๋กœ๋”ฉ: AnnotationConfigWebApplicationContext:loadBeanDefinitions()
    • BeanPostProcessor ๋“ฑ๋ก: PostProcessorRegistrationDelegate:registerBeanPostProcessors()
    • SingletonBean (์ „์ฒ˜๋ฆฌ)๋ฏธ๋ฆฌ ๋“ฑ๋ก: DefaultListableBeanFactory:preInstantiateSingletons()

ApplicationContext ๋ฅผ ์ƒ์„ฑ(์ดˆ๊ธฐํ™”)ํ•˜๋Š” ์ฒซ ๋‹จ๊ณ„๋Š” DispatcherServlet ์˜ ๋ถ€๋ชจ ํด๋ž˜์Šค์ธ HttpServletBean ์˜ init() ๋ฉ”์„œ๋“œ์ด๋‹ค. ์ด ํด๋ž˜์Šค๋Š” Servlet Spec ์— ๋”ฐ๋ผ init ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•˜๋Š”๋ฐ ์ด๋•Œ FrameworkServlet ํด๋ž˜์Šค์˜ initServletBean() ๋ฉ”์„œ๋“œ๋ฅผ ์‹คํ–‰ํ•œ๋‹ค. ์ด ๋ถ€๋ถ„์„ ๋ณด๋ฉด ApplicationContext ์˜ ์‹œ์ž‘์ง€์ ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

ํด๋ž˜์Šค ๋ณ„ ์„ค์ • ๋ฐ์ดํ„ฐ ์ •๋ณด

๐ŸšŒ ์Šคํ„ฐ๋”” ์ง„ํ–‰ ํ˜„ํ™ฉ

๐Ÿค” ์Šคํ„ฐ๋”” ๋งˆ์ง€๋ง‰ ์ •๋ฆฌ(๋‚ด๊ฐ€ ์ƒ๊ฐํ•˜๋Š” Spring MVC)

CHH, HCH, HKH, HSM, KDH, KHG, KIK, KYS, YHJ

spring-mvc-study's People

Contributors

homelus avatar sefide avatar ukino07 avatar pplenty avatar kanghack2 avatar hisfy avatar vvshinevv avatar ukino1989 avatar sungminhong avatar flzl2008 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.