λ²μ μ κ·Έλ μ΄λ λ°°κ²½
νλ‘μ νΈμμ U2L(Unix To Linux) μμ μ μ§ννλ©° μ΅μ Linuxμμ κΆμ₯νκ³ λν 보μ μ·¨μ½μ κ²μ¬ ν΅κ³Όλ₯Ό μν΄ JDK λ²μ μΌλ‘ μ¬λ €μΌ νλ μΌμ΄ λ°μνλ€.
ν΄λΉ κ³Όμ μμ, νλκΉμ κ΄λ ¨λ μλΈ μμ€ν μ Spring Boot λ²μ λ κ°μ΄ μ¬λ¦¬κ² λμκ³ , Migration κ³νμ μΈμ°λ©΄μ 곡λΆνλ κ²λ€μ 곡μ νκ³ μ νλ€.
λ΄κ° μνλ λ²μ μ 2.7.18λ²μ μ΄μκ³ , λ¨κ³λ³λ‘ λ²μ μ μ
κ·Έλ μ΄λ νλ©΄μ μ§ννλ €κ³ νμΌλ μλΈ μμ€ν
μ΄κΈ°μ μ½λμλ λ§μ§ μκ³ μμ ν λΆλΆμ΄ λ§μ§ μμ κ²μΌλ‘ νλ¨νμ¬ ν λ²μ μ¬λ¦¬κ² λμλ€.
(μ΄λ κ² ν΄μ λ¬Έμ κ° λ°μνμ§λ μμμ§λ§, μ¬λ¬λΆλ€μ ν° μ
λ°μ΄νΈκ° μμλ λ²μ λ€μ μ°¨λ‘λλ‘ μ
κ·Έλ μ΄λ νλ κ²μ μΆμ²νλ€.)
λ§μ΄κ·Έλ μ΄μ μμ
1. λ§μ΄κ·Έλ μ΄μ support Dependency μΆκ° (λλλ©΄ μμ )
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
<scope>runtime</scope>
</dependency>
2. Spring Boot μ JDK λ²μ λ³κ²½
νμ¬ μ¬μ©νκ³ μλ WASκ° μ§μν΄μ£Όλ JDK λ²μ μ΄ 11μ΄ μ΅λμ¬μ μλμ²λΌ κ²°μ νλ€.
Spring Boot 2.7.18
JDK 11
3. Dependency μ κ·Έλ μ΄λ or λ³κ²½
μλ 곡μ λ¬Έμμμ μ 곡ν΄μ£Όλ Spring Boot 2.7.18μμ κ΄λ¦¬νλ Dependency λ²μ μ νμΈνκ³ μμ νλ€.
Dependency Versions
The following table provides details of all of the dependency versions that are provided by Spring Boot in its CLI (Command Line Interface), Maven dependency management, and Gradle plugin. When you declare a dependency on one of these artifacts without dec
docs.spring.io
4. application.yml μμ
warning νμμ λ°λΌμ μ΅μ μ€μ μ λ§κ² μμ μ μ§ννμΌλ©°, Spring Boot 2.x λΆν°λ Bean Overriding μ΅μ μ΄ λν΄νΈλ‘ "false"λ‘ μ€μ λμ΄ μκΈ° λλ¬Έμ, Bean Overridingμ μ¬μ©νλ €λ©΄ μ€μ μ ν΅ν΄ "true"λ‘ λ³κ²½ν΄μΌ νλ€.
μ΄μΈμλ, actuator•swagger•profile•driver-class-name μ€μ λ± μ¬λ¬ λΆλΆμμ μμ μ΄ λ°μνλ€.
spring:
main:
allow-bean-definition-overriding: true
5. logback.xml μμ
SizeAndTimeBasedFNATP μ μ±
μ΄ Max file sizeλ₯Ό νμλ‘ μ
λ ₯νλλ‘ λ³κ²½λμ΄μ μΆκ°λ‘ μ€μ νκ² λμλ€.
μ΄λ, μ μ ν μ¬μ΄μ¦λ₯Ό μ ννκΈ° μν΄ νμ¬ μ΄μ λ‘κ·Έκ° μ΄λ μ λμ ν¬κΈ°λ‘ λ§€μΌ μμ±λλμ§ νμΈνμ¬ κ°μ₯ ν° μ¬μ΄μ¦λ³΄λ€ μ‘°κΈ λ ν¬κ² μ€μ νμλ€.
5. Import λ³κ²½ λ° μ½λ λ³κ²½
λ§μ λΆλΆμμ λ³κ²½μ΄ λ°μνμ§λ§,
μ£Όμν κ² μ€ νλλ Spring Boot 2.7 λ²μ μμ DBCP μ€ κ°μ₯ μ°μ μμκ° λκ³ Performanceκ° λμ HikariCPλ‘ λ³κ²½νκ² λμλ€λ κ²μ΄κ³ , λ€λ₯Έ νλλ Spring Security λ²μ μ΄ μ¬λΌκ°λ©΄μ SecurityFilterChain Bean μμ± λ©μλλ₯Ό λ§λλ κ²μΌλ‘ λ³κ²½λμλ€λ μ μ΄λ€.
1. Datasource λ³κ²½
tomcat Datasource -> Hikari Datasource λ³κ²½
2. WebSecurity μ€μ λ³κ²½ (Spring Security λ²μ λ³κ²½ λλ¬Έ)
WebSecurityConfigurerAdapter Depreactedλ‘ μμ νκ³ SecurityFilterChain Bean μμ± λ©μλ μΆκ°
3. FilterRegistrationBean import κ²½λ‘ λ³κ²½
org.springframework.boot.context.embedded.FilterRegistrationBean
-> org.springframework.boot.web.servlet.FilterRegistrationBean
4. EmbeddedServletContainerCustomizer μΈν°νμ΄μ€ Depreacted
WebServerFactoryCustomizer<ConfigurableWebServerFactory> μΈν°νμ΄μ€λ‘ λ³κ²½
5. WebMvcConfigureAdapter ν΄λμ€ Deprecated
WebMvcConfigurer μΈν°νμ΄μ€λ‘ λ³κ²½
6. swagger import λ³κ²½
νμ¬ κ΄λ¦¬λκ³ μμ§ μμ spring-fox-swaggerμμ springdoc-openapi-ui-swaggerλ‘ λ³κ²½νλ©΄μ μ½λ λ³κ²½
6. ν΅ν© ν μ€νΈ μ§ν
미리 μμ±λμ΄ μλ ν΅ν© ν μ€νΈ μ½λλ₯Ό μ€νν΄μ 쿼리 κ²°κ³Όκ° μ λ°μμμ§λ λ±μ 체ν¬νκ³ , Security μ€μ μ΄λ λ€λ₯Έ μ½λκ° μ λ³κ²½λμλμ§ JUnitμ μ΄μ©ν΄μ ν μ€νΈλ₯Ό μ€ννλ€.
7. λ³κ²½μ¬ν μ 리 λ° λ¦¬λ·°
κ°μ₯ μ€μν λ¨κ³μ΄λ€..
κΌΌκΌΌνκ² νμΈνμμλ λΆκ΅¬νκ³ , μ΄ λΆλΆμμ λ€λ₯Έ μ¬λλ€μ 리뷰λ₯Ό ν΅ν΄ μλͺ»λ λΆλΆμ΄λ μΆκ°μ μΌλ‘ μμ ν΄μΌ νλ λΆλΆμ μ°Ύμ μ μμλ€.
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Gui
Spring Boot 2.0 Migration Guide
Spring Boot. Contribute to spring-projects/spring-boot development by creating an account on GitHub.
github.com
'π Backend > π Spring' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
JNDIλ₯Ό μ΄μ©νμ¬ Datasourceλ₯Ό μ€μ ν μ΄μ (0) | 2024.04.03 |
---|---|
OncePerRequestFilter μ¬μ©νλ μ΄μ (0) | 2024.04.03 |
μΏ ν€, μΈμ , ν ν°, Hybrid ν ν° μΈμ¦ λ°©μμ μ°¨μ΄ (0) | 2023.09.11 |
Spring Cloud #1 (0) | 2023.05.28 |
νμΌ μ λ‘λ νλ λ°©λ²(Form, Spring) (0) | 2022.09.12 |