์ฒ˜์Œ์—” ๋Œ€์ถฉ ํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•ด๋ณด๋ คํ–ˆ์ง€๋งŒ,
์ด๋Ÿด์ˆ˜๊ฐ€! ์•„๋Š” ๊ฒƒ์ด ๋ฏธ์•ฝํ•˜๋‹ˆ ์‹œ์ž‘ํ•  ์ˆ˜ ์—†์—ˆ๋‹ค.

๊ทธ๋ž˜์„œ ๊ฐ€์žฅ ๊ธฐ์ดˆ์ ์œผ๋กœ ์•Œ์•„์•ผํ•˜๋Š” ๊ฐœ๋…์„ ์ฐจ๊ทผ์ฐจ๊ทผ ์ •๋ฆฌํ•ด๋ณผ๊นŒ ํ•œ๋‹ค.

๋‘๋‘ฅ, Spring MVC๋ž€?

์•„๋งˆ ์ •๋ณด์ฒ˜๋ฆฌ๊ธฐ์‚ฌ๋ฅผ ์ค€๋น„ํ•˜๊ฑฐ๋‚˜, IT๊ด€๋ จ ์ „๊ณต์ž๋ผ๋ฉด ํ•œ ๋ฒˆ์€ ๋“ค์–ด๋ดค์„ MVC.
์ด๋ฒˆ ๊ธฐํšŒ์— ์ž์„ธํžˆ ์•Œ์•„๋ณด์ž.

 

 

 

 

๐Ÿชฝ

"ํ‹€๋ฆฐ ๋‚ด์šฉ์ด ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค."

 

 

 


 

[ Hello World๋ฅผ ์ถœ๋ ฅํ•˜๊ธฐ ]

 

Spring - [IntelliJ] Hello Word ์ถœ๋ ฅํ•˜๊ธฐ

์•„์ฃผ ๊ฐ„๋‹จํ•œ ์‹ค์Šต์„ ํ•ด๋ณผ๊นŒํ•œ๋‹ค.  Hello, World ์ถœ๋ ฅํ•˜๊ธฐ๐ŸŽƒ1. Spring initializr ์ƒ์„ฑํ•˜๊ธฐ. https://start.spring.io/  โ–ก  Dependencies - SpringWeb ์„ ํƒํ•˜๊ธฐ.โ–ก  Java ํ•ด๋‹นํ•˜๋Š” ๋ฒ„์ „์— ์„ ํƒํ•˜๊ธฐ.    โœ”๏ธŽ  [Mac ๊ธฐ

post-this.tistory.com

 


 

 

 

1. MVC

  • Model - View - Controller๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ๋‹ค.
  • Model, View, Controller๋Š” ๋…๋ฆฝ์ ์œผ๋กœ ์›€์ง์ธ๋‹ค. (๊ฐ์ž ๋งก์€ ๋ถ„์•ผ๋งŒ ํ•ด๊ฒฐํ•œ๋‹ค)
  • MVC ์‚ฌ์šฉ์‹œ, ๊ฒฐํ•ฉ๋„๋ฅผ ๋‚ฎ์ถœ ์ˆ˜ ์žˆ๋‹ค.
  • MVC ์‚ฌ์šฉ์‹œ, ์ค‘๋ณต์ฝ”๋“œ ์ œ๊ฑฐ๊ฐ€ ์‰ฝ๊ณ  ์œ ์ง€๋ณด์ˆ˜์— ์ข‹๋‹ค.
  • MVC ์‚ฌ์šฉ์‹œ, ํ™•์žฅ์„ฑ๊ณผ ์œ ์—ฐ์„ฑ์ด ์ฆ๊ฐ€ํ•œ๋‹ค.

 

(1)  View

  • ์‚ฌ์šฉ์ž๊ฐ€ ๋ณด๋Š” ํ™”๋ฉด์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜๋ฉด ๋œ๋‹ค.
  • ์˜ˆ์‹œ๋ฅผ ๋“ค์–ด๋ณด์ž, ์‚ฌ์šฉ์ž๊ฐ€ ์›น ๊ฒ€์ƒ‰์ฐฝ์— [apple]์ด๋ผ๊ณ  ๊ฒ€์ƒ‰ํ•˜๊ธธ ์š”์ฒญํ–ˆ๋‹ค.

 

(2)  Controller

  • View์™€ Model์„ ์—ฐ๊ฒฐํ•ด์ฃผ๋Š” ์ค‘๊ฐ„์—์„œ ์ƒํ˜ธ์ž‘์šฉ ์—ญํ• ์„ ํ•ด์ค€๋‹ค.
  • ์‚ฌ์šฉ์ž์˜ ์š”์ฒญ์„ Controller๊ฐ€ ๋ฐ›์•˜๋‹ค. (DispatcherServlet๋ผ๋Š” Front Controller๊ฐ€ ๋ฐ›์Œ)
  • Controller๋Š” ์ด ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด [apple]์ด๋ž€ ๋‹จ์–ด๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์„ Model์—๊ฒŒ ์ „๋‹ฌํ•œ๋‹ค.

 

(3)  Model

  • ๋ฐ์ดํ„ฐ์™€ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์„ ๋‹ด๋‹นํ•œ๋‹ค
  • ์ด๋•Œ ํด๋ผ์ด์–ธํŠธ์—๊ฒŒ ์‘๋‹ต์œผ๋กœ ๋Œ๋ ค์ฃผ๋Š” ์ž‘์—…์˜ ์ฒ˜๋ฆฌ ๊ฒฐ๊ณผ ๋ฐ์ดํ„ฐ๋ฅผ Model์ด๋ผ ํ•œ๋‹ค.
  • Controller์—๊ฒŒ ์˜จ ์š”์ฒญ์„ ์ž˜ ๋ฐ›์•˜๋‹ค.
  • Model์€ [apple]์ด๋ž€ ๋‹จ์–ด ๊ด€๋ จ ๋ฐ์ดํ„ฐ๋ฅผ ์ฐพ์•„ Controller์—๊ฒŒ ๋‹ค์‹œ ์ „๋‹ฌํ•œ๋‹ค.
  • Controller๋Š” ๋ฐ›์€ ์ •๋ณด๋ฅผ ๋‹ค์‹œ View์—๊ฒŒ ๋ณด๋‚ด๊ณ  View๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์—ฌ์ค€๋‹ค.

 

 


 

 

2. Spring MVC ๊ตฌ์„ฑ์š”์†Œ์™€ ์ˆœ์„œ

์ถœ์ฒ˜: https://www.geeksforgeeks.org/spring-mvc-framework/

 

1๋ฒˆ

  • ์‚ฌ์šฉ์ž์—๊ฒŒ ์š”์ฒญ(Requeest)์ด ๋“ค์–ด์™”๋‹ค.
  • ์š”์ฒญ์€ ํŠน์ • URL๊ณผ ํ•จ๊ป˜ ๋“ค์–ด์˜ค๊ฒŒ ๋˜๋Š”๋ฐ GET, POST ๋“ฑ HTTP ๋ฉ”์„œ๋“œ๊ฐ€ ํ•จ๊ป˜ ์ „๋‹ฌ๋œ๋‹ค.

 

 

2๋ฒˆ•3๋ฒˆ

  • ์š”์ฒญ์ด ๋“ค์–ด์˜ค๋ฉด Front Controller์ธ DispatcherServlet์ด ์š”์ฒญ์„ ๋ฐ›๊ฒŒ ๋œ๋‹ค.
  • DispatcherServlet์€ ์ ์ ˆํ•˜๊ฒŒ ์ฒ˜๋ฆฌํ•  Controller๋ฅผ ์ฐพ๊ธฐ ์œ„ํ•ด HandlerMapping์„ ์ด์šฉํ•œ๋‹ค.
  • ๊ทธ๋ ‡๊ฒŒ HandlerMapping์€ ๋“ค์–ด์˜จ ์š”์ฒญ ๊ฒฝ๋กœ์™€ HTTP ๋ฉ”์„œ๋“œ์— ๋”ฐ๋ผ ์ ์ ˆํ•œ Controller๋ฅผ ์ •ํ•ด ๋ฐ˜ํ™˜ํ•œ๋‹ค.

 

 

์ถœ์ฒ˜: https://www.geeksforgeeks.org/spring-mvc-framework/

 

 

 

4๋ฒˆ•5๋ฒˆ

  • HadlerMapping์ด ์ฐพ์€ Controller๋Š” ์š”์ฒญ์„ ์‹ค์ œ๋กœ ์ฒ˜๋ฆฌํ•˜๋Š” ์—ญํ• ์„ ํ•œ๋‹ค.
  • Controller๋Š” ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง(์˜ˆ์‹œ๋กœ ํšŒ์›๊ฐ€์ž…์„ ์ฒ˜๋ฆฌํ•˜๊ฑฐ๋‚˜ ์‡ผํ•‘๋ชฐ์—์„œ ๊ฒฐ์ œ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒƒ)์„ ์‹คํ–‰ํ•˜๊ณ  ๊ทธ์— ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ ์ƒ์„ฑ ํ˜น์€ DB์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ถˆ๋Ÿฌ์˜จ๋‹ค.
  • ์‰ฝ๊ฒŒ ๋งํ•ด View๋กœ ์ „๋‹ฌํ•  ๋ฐ์ดํ„ฐ๋ฅผ ์ค€๋น„ํ•˜๋Š” ๊ฒƒ์ด๊ณ , Model And View๊ฐ€ ๊ฒฐ๊ณผ์— ๋‹ด๊ฒจ DispatcherServlet์— ๋ฐ˜ํ™˜ํ•œ๋‹ค.

 

 

6๋ฒˆ•7๋ฒˆ

  • ๋ฐ˜ํ™˜๋œ ์ •๋ณด๋ฅผ ๊ธฐ์ค€์œผ๋กœ ํด๋ผ์ด์–ธํŠธ์—๊ฒŒ ์ ์ ˆํ•˜๊ฒŒ ๋ณด์—ฌ์ค„ View๋ฅผ ๊ณ ๋ฅผ ๊ฒƒ์ด๋‹ค.
  • View Resolver๋Š” Controller๊ฐ€ ๋ฐ˜ํ™˜ํ•œ View ์ด๋ฆ„์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์‹ค์ œ View ํŒŒ์ผ์„ ์ „๋‹ฌํ•œ๋‹ค.

 

 

์ถœ์ฒ˜: https://www.geeksforgeeks.org/spring-mvc-framework/

 

 

 

8๋ฒˆ

  • View์—์„œ View Rendering์ด ์ผ์–ด๋‚œ๋‹ค.
  • View Rendering์€ ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ๋กœ์ง์„ ํฌํ•จํ•˜๊ณ  ์žˆ๋‹ค.
  • ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ๋กœ์ง์„ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์›นํŽ˜์ด์ง€๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ณด์—ฌ์ค€๋‹ค.

 

 

10๋ฒˆ

  • View์—์„œ Rendering๋œ ๊ฒฐ๊ณผ๋Š” DispatcherServlet์— ๋ฐ˜ํ™˜๋œ๋‹ค.
  • ์‚ฌ์šฉ์ž๋Š” ์ž์‹ ์ด ์š”์ฒญํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ›๊ฒŒ๋œ๋‹ค.

 

 


 

 

3. Spring MVC ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ด์œ 

 

(1) DispathcerServlet

  • ๊ธฐ๋ณธ์ ์œผ๋กœ ๋‹ค๋ฅธ MVC๋Š” DispatcherServlet๊ฐ€ ์—†๋‹ค.
  • ๊ทธ๋ ‡๊ธฐ์— Controller๊ฐ€ ์š”์ฒญ์„ ๋ฐ›๊ณ , ์ง์ ‘์ฒ˜๋ฆฌ๋„ ํ•œ๋‹ค.
  • DispatcherServlet์ด ์žˆ๊ธฐ์—” ์š”์ฒญ ์ฒ˜๋ฆฌ๋ฅผ ๋” ๊ฐ„๊ฒฐํ•˜๊ฒŒ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ค€๋‹ค.

 

 

(2) @๋กœ ์‹œ์ž‘ํ•˜๋Š” ์–ด๋…ธํ…Œ์ด์…˜์˜ ์œ ๋ฌด

  • ์–ด๋…ธํ…Œ์ด์…˜์˜ ์‚ฌ์šฉ์œผ๋กœ ์ธํ•ด ์ค‘๋ณต์ ์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” ์ฝ”๋“œ๋ฅผ(ํ˜น์€ ๋น„์Šทํ•œ ์ฝ”๋“œ) ์ค„์ผ ์ˆ˜ ์žˆ๋‹ค.
  •  ๊ทธ๋กœ์ธํ•ด ๊ฐ€๋…์„ฑ์ด ํ–ฅ์ƒ๋œ๋‹ค.

 

 

(3) Ioc(์ œ์–ด์˜ ์—ญ์ „)์™€ DI(์˜์กด์„ฑ์ฃผ์ž…)

  • ๊ฐ์ฒด๊ฐ„์˜ ์˜์กด์„ฑ์„ ํ”„๋ ˆ์ž„์›Œํฌ๊ฐ€ ์ž๋™์œผ๋กœ ์ฃผ์ž…ํ•˜๊ณ  ๊ด€๋ฆฌํ•œ๋‹ค.

 

 


 

 

 

4. SpringMVC๋Š” ์–ด๋–ค์‹์œผ๋กœ ๊ตฌ์„ฑ์„ ํ•ด์•ผํ•˜๋Š”๊ฐ€?

์‡ผํ•‘๋ชฐ์—์„œ ์ฃผ๋ฌธ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒƒ์„ ๊ฐ„๋žตํ•˜๊ฒŒ ์˜ˆ๋กœ ๋“ค์–ด๋ณด์ž.

 

 

(1) Controller

์ฃผ๋ฌธ์ด ๋“ค์–ด์™”์„ ๋•Œ ์ฃผ๋ฌธ ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•  Controller๋ฅผ ๋งŒ๋“ค์–ด์•ผํ•œ๋‹ค.

@RestController  ํ˜น์€ Controller
@RequestMapping("/์š”์ฒญ์ด ๋“ค์–ด์˜จ ๊ฒฝ๋กœ")
public class OrderController {

 ์ฃผ๋ฌธ ์š”์ฒญ์„ ์ง์ ‘ ์ฒ˜๋ฆฌํ•˜์ง€ ์•Š๊ณ , ํ•ด๋‹นํ•˜๋Š” ์„œ๋น„์Šค ๊ณ„์ธต์œผ๋กœ ๋„˜๊ธด๋‹ค.

 ์ฃผ๋ฌธ ์ฒ˜๋ฆฌ ์„ฑ๊ณต์‹œ ์–ด๋–ป๊ฒŒ ๋ฐ˜ํ™˜ํ• ์ง€
 ์ƒํƒœ ์ฝ”๋“œ์™€ ๋ฐ์ดํ„ฐ๋ฅผ ํ•จ๊ป˜ ๋ณด๋‚ด๋Š” ๋“ฑ...

}

 

 

 

(2) Service

์ฃผ๋ฌธ ์š”์ฒญ์„ ๋ฐ›์•„ ์ฃผ๋ฌธ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์„ ๋งŒ๋“ค์–ด์•ผํ•œ๋‹ค.

@Service
public class OrderServiceImpl implements OrderService {

 ์ฃผ๋ฌธ๋‚ด์—ญ์„ ์ง์ ‘ ์ฒ˜๋ฆฌ

 ์˜ˆ์‹œ๋กœ, ์ฃผ๋ฌธ์ด ๋“ค์–ด์˜จ ์ƒํ’ˆ์ด ์กด์žฌํ•˜๋Š”์ง€ ํ™•์ธํ•˜๊ฑฐ๋‚˜
 ์ƒ์„ฑ๋œ ์ฃผ๋ฌธ์„ ๋ฐ์ดํ„ฐ ๋ฒ ์ด์Šค์— ์ €์žฅํ•˜๊ฑฐ๋‚˜ ๋“ฑ...
 ๊ฒฐ๊ณผ๋ฅผ ๋ˆ„๊ตฌ์—๊ฒŒ ๋ฐ˜ํ™˜ํ• ์ง€๊นŒ์ง€ ์ •ํ•˜๋Š” ๊ณณ

}

 

 

 

(3) Repository

์ฃผ๋ฌธ ๋‚ด์—ญ์„  ์ €์žฅํ•  ์ €์žฅ์†Œ

public interface OrderRepository <Order, Long> {

 Order๊ณผ ์—ฐ๊ฒฐ๋œ ์ €์žฅ์†Œ๋กœ ์ž‘์—… ์ˆ˜ํ–‰

}

 

 

 

(4) Entity

์ฃผ๋ฌธ ๋ฐ์ดํ„ฐ ๋ชจ๋ธ๋กœ ์ฃผ๋ฌธ์ด ๋“ค์–ด์˜ค๋ฉด ๊ฐ์ฒด๋ฅผ ์ดˆ๊ธฐํ™”

@Entity
public class Order {

 ์ฃผ๋ฌธ ๊ณ ์œ ์˜ ID๋ฅผ ๋งŒ๋“ค๊ฑฐ๋‚˜
 ์—ฌ๋Ÿฌ๊ฐœ์˜ ์ฃผ๋ฌธ์„ ํ•˜๋‚˜์˜ ์ƒํ’ˆ์œผ๋กœ ์—ฐ๊ฒฐ๋˜๋„๋ก ํ•˜๊ฑฐ๋‚˜
 ์ƒ์„ฑ์ž๋ฅผ ์ด์šฉํ•˜์—ฌ ์ฃผ๋ฌธ์„ ์ดˆ๊ธฐํ™”ํ•ด์ฃผ๋Š” ๊ฒƒ ๋“ฑ...
   
}

 

 

 

(5) DTO
์š”์ฒญ๊ณผ ์‘๋‹ต๋งŒ ์—ฐ๊ฒฐํ•˜๋Š” ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๋งŒ ๋‹ด๋‹น, ๋ฐ์ดํ„ฐ ์ „๋‹ฌ ๊ฐ์ฒด

public class OrderRequest {

 ์ฃผ๋ฌธ์— ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›๋Š” ๊ฐ์ฒด
 ์ƒํ’ˆ ID, ์ˆ˜๋Ÿ‰...

}

public class OrderResponse {

 ์ฃผ๋ฌธ ์™„๋ฃŒํ•œ ๋ฐ์ดํ„ฐ ๋ฐ˜ํ™˜ ๊ฐ์ฒด
 ์ฃผ๋ฌธ ID, ์ด ๊ฐ€๊ฒฉ...

}

 

 

 


 

์‚ฌ์‹ค ์Šคํ”„๋ง์˜ ํŒจํ„ด์—๋Š” MVC๋งŒ ์žˆ๋Š” ๊ฒƒ์€ ์•„๋‹ˆ๋‹ค. ๋” ๋‹ค์–‘ํ•œ ๋””์ž์ธ ํŒจํ„ด์ด ์กด์žฌํ•˜์ง€๋งŒ, ๋ชจ๋ธ - ๋ทฐ - ์ปจํŠธ๋กค๋Ÿฌ๋กœ ์šฉ๋„๋ฅผ ๋‚˜๋ˆ„๊ณ  ์„œ๋กœ์˜ ์—ญํ• ์—” ์นจ๋ฒ”ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์ด ํฐ ์žฅ์ ์ด ๋˜์–ด MVC๋ฅผ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

๊ณต๋ถ€ํ•˜๋ฉด์„œ ์ดํ•ด๊ฐ€ ์•ˆ๋˜๋Š” ๋‚ด์šฉ์ด ๋งŽ์•˜๋‹ค.

์ดํ•ดํ•œ ๋‚ด์šฉ๊นŒ์ง€๋งŒ ๋ธ”๋กœ๊ทธ์— ์ ์–ด๋ณด์•˜๋‹ค.

์•„๋ž˜ ์ ์–ด๋‘” ์ถœ์ฒ˜์— ๋“ค์–ด๊ฐ€ ํ•œ ๋ฒˆ์”ฉ ์ฝ์–ด๋ณธ๋‹ค๋ฉด ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค.

 


 

- spring ์ถœ์ฒ˜

 

์šฐ๋ฆฌ๋Š” ์™œ ์Šคํ”„๋ง์„ ์‚ฌ์šฉํ•˜๋Š”๊ฐ€? - Java spring์˜ ํŠน์ง•

์•ž์„  ๊ธ€์—์„œ ์™œ ์šฐ๋ฆฌ๊ฐ€ ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ์ง€ ์•Œ์•„๋ณด์•˜๋‹ค. ์งง๊ฒŒ ์งš๊ณ  ๋„˜์–ด๊ฐ€์ž๋ณด์ž. ๊ฒฐ๊ตญ ๊ฐœ๋ฐœ์ž ์ž…์žฅ์—์„œ๋Š” ๊ฒ€์ฆ๋œ ์ฝ”๋“œ๋ฅผ ์ด์šฉํ•ด์„œ ์ตœ์†Œํ•œ์˜ ๋ถ€๋ถ„๋งŒ ๋ฐ”๊พธ์–ด ๋น ๋ฅด๊ฒŒ ๊ฐœ๋ฐœํ•˜๊ธฐ ์œ„ํ•ด์„œ

joychae.tistory.com

 

 

- Spring MVC ์ถœ์ฒ˜

 

A Comprehensive Guide To Spring MVC | SevenMentor Training

Explore A Comprehensive Guide to Spring MVC, covering key concepts, architecture, and components for building robust, scalable Java web applications.

www.sevenmentor.com

 

 

- Spring MVC์˜ ์žฅ์  ์ถœ์ฒ˜

 

Spring vs Spring MVC vs Spring Boot: A Detailed Comparison for Java Developers

In the ever-evolving landscape of Java development, the Spring Framework has emerged as a powerhouse,...

dev.to

 

 

 

- Spring MVC ์ถœ์ฒ˜

 

[Spring] Web MVC ํŒจํ„ด์˜ ํ๋ฆ„๊ณผ Controller, View, Model ๊ตฌํ˜„๋ฒ•

์Šคํ”„๋ง MVC ํŒจํ„ด์˜ ํ๋ฆ„, ํŠน์ง•, ๊ตฌ์„ฑ์š”์†Œ, ์‹คํ–‰ ์ˆœ์„œ. Controller, View, Model ๊ตฌํ˜„๋ฒ•

velog.io

 

 

 

- Spring MVC ์ถœ์ฒ˜

 

[Spring MVC] ์Šคํ”„๋ง MVC๋ž€ ๋ฌด์—‡์ธ๊ฐ€? - ์Šคํ”„๋ง MVC ๊ตฌ์กฐ ์ดํ•ด

๋ณธ ๋‚ด์šฉ์€ ์˜จ๋ผ์ธ ๊ฐ•์˜ ์‚ฌ์ดํŠธ ์ธํ”„๋Ÿฐ์˜ ๊น€์˜ํ•œ ๋‹˜์˜ ๊ฐ•์˜ ๋‚ด์šฉ์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. '์Šคํ”„๋ง MVC 1ํŽธ - ๋ฐฑ์—”๋“œ ์›น ๊ฐœ๋ฐœ ํ•ต์‹ฌ ๊ธฐ์ˆ ' ์Šคํ”„๋ง MVC 1ํŽธ - ๋ฐฑ์—”๋“œ ์›น ๊ฐœ๋ฐœ ํ•ต์‹ฌ ๊ธฐ์ˆ  - ์ธํ”„๋Ÿฐ | ๊ฐ•์˜ ์›น

ittrue.tistory.com

 

 

- Mapping ์ถœ์ฒ˜

 

[JAVA] Web์—์„œ์˜ ๋งตํ•‘(Mapping)์ด๋ž€??

์˜ค๋Š˜์€ Mapping์— ๋Œ€ํ•ด์„œ ๊ฐ„๋‹จํžˆ ์•Œ์•„๋ณด๊ฒ ๋‹ค. ๋งตํ•‘์ด๋ž€? ํ•ด๋‹น ๊ฐ’์ด ๋‹ค๋ฅธ ๊ฐ’์„ ๊ฐ€๋ฅดํ‚ค๋„๋ก ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. Ex) http~/action.do ๋ผ๋Š” ํŽ˜์ด์ง€๋ฅผ ๋งŒ๋“ค์—ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ• ๋•Œ ์ด url์ด ๊ทธ๋Œ€๋กœ ์œ ์ถœ๋˜๋ฉด ๋ณด์•ˆ์ƒ ์ทจ์•ฝํ• 

wjdvnadldzm.tistory.com

 

+ Recent posts