Springboot 2.6.0 릴리즈

Kevin Park
2 min readNov 26, 2021

--

안녕하세요. Kevin 입니다.

Spring Boot 2.6 릴리즈가 되었습니다.

Circular References Prohibited by Default
순환참조 방지 property가 생겼으며 기본 true 입니다. 순환참조를 허용하고 싶을 경우 spring.main.allow-circular-references 를 변경하여 허용 할 수 있습니다.

PathPattern Based Path Matching Strategy for Spring MVC
Spring MVC 핸들러 매핑에 대해 요청 경로를 일치시키는 기본 전략이 AntPathMatcher에서 PathPatternParser로 변경되었습니다.

Actuator Env InfoContributor Disabled by Default

Application Startup
spring.boot.application.running 이 spring.boot.application.ready로 변경되었습니다.

Web Resources Configuration
Web Resources를 사용하기 위해 Resources 주입으로는 더 이상 사용 할 수 없습니다. WebProperties를 사용해야 합니다.

Dependency Management Removals

Prometheus Version Property
prometheus-pushgateway.version 이 prometheus-client.version 으로 변경 되었습니다.

Embedded Mongo
임베디드 mongo를 사용하려면 spring.mongodb.embedded.version 속성을 설정해야 합니다.

Oracle Database Driver Dependency Management

Vault-related Flyway Properties Removed
spring.flyway.vault-secrets, spring.flyway.vault-token 및 spring.flyway.vault-url 속성이 제거되었습니다

WebFlux Session Properties
spring.webflux.session 은 더 이상 사용되지 않으며 server.reactive.session으로 변경되었습니다.

Elasticsearch Property Consolidation

Maven Build Info’s Default Time
project.build.outputTimestamp 을 빌드 시간으로 사용합니다.

Records and @ConfigurationProperties
ConfigurationProperties를 사용하고 단일 생성자의 경우 ConstructorBinding을 더 이상 사용하지 않아도 됩니다.

Spring Boot 2.6.0 Configuration Changelog
변경, 추가 또는 제거 된 설정들이 있습니다. 참고하시면 도움이 될 것 같네요.
추가 된 설정 중 제가 필요했던 Support for Log4j2’s Composite Configuration도 있습니다.

추가로 2.6.0 적용 후 다음과 같은 경고가 발생하는데요

i.l.c.r.DefaultClientResources WARN io.lettuce.core.resource.DefaultClientResources was not shut down properly, shutdown() was not called before it's garbage-collected. Call shutdown() or shutdown(long,long,TimeUnit)

해당 부분은 2.6.1에 해결 되었습니다. (https://github.com/spring-projects/spring-boot/pull/28767)

2.6.0에서 해당 경고를 제거하고 싶으시다면 임시로 Bean을 추가해주시면 됩니다.

@Bean(destroyMethod = "shutdown")
ClientResources clientResources() {
return DefaultClientResources.create();
}

감사합니다.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Kevin Park
Kevin Park

No responses yet

Write a response