Skip to main content

Controller Lifecycle

Learn Controller Lifecycle (Controllers, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Controller lifecycle has two parts: the bean is created once at startup as a singleton, and then each request is handled by the same instance on a different thread. Request flow : DispatcherServlet finds a handler, applies interceptors, resolves arguments, calls the method, then handles the return value. Bean callbacks such as @PostConstruct and @PreDestroy run once, not per request.

More lessons in Controllers