Spring Boot μ Hibernate λ₯Ό μ¬μ©νμ¬ Java Application μ build
Course Preview
- Spring Boot application κ°λ°
- DB μ κ·Όμ μνμ¬ Hibernate/JPA λ₯Ό νμ©
- Spring Boot λ₯Ό μ¬μ©νμ¬ REST API κ°λ°
- Spring Boot λ₯Ό μ¬μ©νμ¬ Spring MVP app μ μμ±
- CRUD κ°λ°μ μνμ¬ Spring Boot μ DB μ°κ²°
- application access λ₯Ό κ΄λ¦¬νκΈ° μνμ¬ Spring Security λ₯Ό μ μ©
- λͺ¨λ Java configuration κ³Ό Maven μ νμ© (no XML)
Spring Boot Overview
Spring Boot
κΈ°μ‘΄μ μ ν΅μ μΈ Spring μμλ JAR(Java ARchive) dependencies λ₯Ό Maven μΌλ‘ ν κ²μΈμ§ μλλ©΄ Gradle λ‘ ν κ²μΈμ§, λ μ΄μ λ§λ configuration μ xml νμμΌλ‘ κ΄λ¦¬ν κ²μΈμ§, Java νμμΌλ‘ κ΄λ¦¬ν κ²μΈμ§λ₯Ό λͺ¨λ μλμΌλ‘ μ€μ ν΄μΌ νλ€. λν server λ± λͺ¨λ μ€μ μ νλνλ λ€ λ§μ Έμ€μΌ νλ€.
κ·Έλ¬λ Spring Boot μμλ μμ κ°μ κ³Όμ μ μ΅μνμν€κ³ , spring-boot-starter-web λΌμ΄λΈλ¬λ¦¬λ₯Ό μ¬μ© μμ κΈ°λ³Έμ μΌλ‘ Tomcat server κ° λ΄μ₯λμ΄ μλ€. λ¬Όλ‘ Jetty λ Undertow λ±μ μλ²λ‘ λ°κΏ μ μλ€.
Spring vs. Spring Boot
Spring Boot λ, κ°λ¨νκ² λ§νλ©΄ Spring μ κΈ°λ°μΌλ‘ ν νμ₯λ framework λ‘, μμμ μ€λͺ νλ―μ΄ Spring μ 볡μ‘ν μ€μ μ μλννμ¬ λΉ λ₯΄κ² application μ κ°λ°νκ³ μ€νν μ μκ² λμμ€λ€. κ·Έλ₯ κ°λ¨νκ² Spring Boot λ Spring μ λ μ½κ² μ¬μ©ν μ μλ λκ΅¬λ‘ λ³΄λ©΄ λ κ² κ°λ€.
Spring Initializr
Spring Initializr λ Spring Boot project λ₯Ό λΉ λ₯΄κ² μμ±ν μ μλ μΉ κΈ°λ° λꡬμ΄λ€.
Spring Boot Embedded Server
Spring Boot λ λ΄μ₯λ HTTP Server λ₯Ό μ 곡νκΈ° λλ¬Έμ λ³λλ‘ λ€λ₯Έ μλ²λ₯Ό μ€μΉν νμκ° μλ€. μ κ·Έλ¦Όκ³Ό κ°μ΄ JAR νμΌμλ application code λΏλ§μ΄ μλλΌ μλ²λ ν¬ν¨λμ΄ μλ κ²μ΄λ€.
Running Spring Boot Apps
κΈ°λ³Έμ μΌλ‘ Spring Boot Apps λ JAR νμΌμ νμμΌλ‘ μμ°λκΈ° λλ¬Έμ IDE μμ μ€ννκ±°λ CLI νκ²½μμ λͺ λ Ήμ΄ μ λ ₯μ ν΅νμ¬ Standalone-fashion μΌλ‘ μ€νν μ μλ€.
Deploying Spring Boot Apps
Spring Boot Apps λ μ ν΅μ μΈ λ°©λ²μΌλ‘ μΈλΆ μλ²μ WAR νμΌμ νμμΌλ‘ λ°°ν¬ν μλ μλ€.
Spring Boot Initializr Demo
Maven
Java project λ₯Ό νλ build νλ €κ³ ν λ μΆκ°μ μΈ JAR νμΌλ€μ΄ νμν λκ° λ€λ°μ¬μΌ κ²μ΄λ€. Spring μ μ¬μ©νλ€λ©΄ μ΄μ κ΄λ ¨λ μ¬λ¬κ°μ μΈλΆ JAR νμΌλ€μ΄ νμν κ²μ΄λ€.
μ΄λ, κ° νμΌλ€μ κ°κ°μ website μμ λ€μ΄λ‘λνμ¬ νλμ© build path λ class path μ λ£μ΄μ£Όλ λ°©λ²μ΄ μμ κ²μ΄λ€. κ·Έλ¬λ Maven μ μ¬μ©νλ©΄ λ¨μν dependencied μ€μ λ§μΌλ‘ κ°κ°μ JAR νμΌμ λ€μ΄λ‘λνκ² λ§λ€κ³ , compile μ΄λ μ€ννλ κ³Όμ μμ ν΄λΉ JAR νμΌλ€μ νμ±νμμΌμ€λ€.
κ°λ¨νκ² λ§ν΄μ, Maven μ persoanl shopper λ° friendly helper λΌκ³ μκ°νλ©΄ λλ€.
Spring Projects
Spring Projects Spring Framwork μ μ€μ¬ μμ μΆκ°μ μΌλ‘ λ§λ€μ΄μ§ module λ€μ μλ―Ένλ€.
Spring Cloud, Spring Data, Spring Batch, Spring Security, Spring Web Services λ± λ§μ Spring Projects λ€μ΄ μ‘΄μ¬νλ€.