Interview_Spring/Springboot/MVC/AOP
β What is Spring?
- open source application framework for JAVA
- Java platform that provides comprehensive infrastructure support for developing Java applications
- can build applcations from POJOs
- uses AOP, DI
Spring π Springboot
- Springboot: sub project to set up project in spring
- built on top of the conventional spring framework
- provides all features of spring + easier to use than spring
- everything is auto configured!
- very useful to develop REST API
- used to develop microservies, fast
- run in independent container
- embedded tomcat run automatically
π‘ https://www.geeksforgeeks.org/difference-between-spring-and-spring-boot/
β MVC Design Pattern?
- useful pattern for code reuseability
- Model, View, Controller
- Model: buisness logic, database
- View: show users
- Controller: connect
Model
andView
to exchange data
π‘ https://soheeparklee.github.io/posts/spring-mvc/
MVC 1 π MVC 2
- MVC1: JSP manages both controller & view
- JSPμμμ λ‘μ§ μ²λ¦¬λ₯Ό μν΄ μλ° μ½λ μ¬μ©
- MVC2: controller and view seperate
- create Servelt to divide work
JSP
manageView
,Servlet
manageController
Filter π Interceptor
- Filter: filter HTTP request, response in servlet container
- Interceptor: after filter, filter pre-processing duties
β Dispatcher Servelt?
- front controller that handles all HTTP requests
β AOP?
- define cross cutting concerns into seperate unit called aspect
- can modularize
for logging, transaction, security
- advice: when
- join point: where
- point cut: where
- weaving: apply aspect to target code
This post is licensed under CC BY 4.0 by the author.