-
Notifications
You must be signed in to change notification settings - Fork 40.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve deprecation notice on ResourceProperties to direct people to WebProperties for dependency injection and then getResources() #28762
Comments
I had a similar problem.
I think there is a similar problem with Web Mvc. |
It isn't a regression. The tricky thing here is that |
I think we should improve the deprecation in 2.5.x to point people to |
Cheers Andy 🍻
…On November 21, 2021 at 20:12:51, Andy Wilkinson ***@***.***) wrote:
Reopened #28762
<#28762>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#28762 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE4V74TF7TKK6H2UMTLDGTUNDV5HANCNFSM5IOTABCA>
.
|
An example would help people better. So adding to @snicoll 's comments, as some people like me will not be able to grab it at the very first instant For instance.
|
Motivation: - Micrometer 1.7.6 -> 1.8.2 - Spring 5.3.13 -> 5.3.15 - Spring Boot 2.5.7 -> 2.6.2 Modifications: - Add `WebServerNamespace` `OperationArgumentResolver`. - Bind additional health group to server. - Inject `WebProperties` directly instead of `WebProperties.Resources`. - spring-projects/spring-boot#28762 - Use `ApiVersion.LATEST` instead of `ActuatorMediaType.V3_JSON`.
Motivation: - Micrometer 1.7.6 -> 1.8.2 - Spring 5.3.13 -> 5.3.15 - Spring Boot 2.5.7 -> 2.6.3 Modifications: - Add `WebServerNamespace` `OperationArgumentResolver`. - Bind additional health group to server. - Inject `WebProperties` directly instead of `WebProperties.Resources`. - spring-projects/spring-boot#28762 - Use `ApiVersion.LATEST` instead of `ActuatorMediaType.V3_JSON`. Result: - You can now use Armeria with Spring Boot 2.6.3
@Slf4j
@Configuration
public class NrpWebPropertiesConfiguration {
@Bean
public WebProperties.Resources resources() {
return new WebProperties.Resources();
}
} public WebFluxGlobalExceptionHandler(ErrorAttributes errorAttributes, NrpWebPropertiesConfiguration nrpWebPropertiesConfiguration,
ApplicationContext applicationContext, ServerCodecConfigurer serverCodecConfigurer) {
super(errorAttributes, nrpWebPropertiesConfiguration.resources(), applicationContext);
super.setMessageWriters(serverCodecConfigurer.getWriters());
super.setMessageReaders(serverCodecConfigurer.getReaders());
} |
After upgrading from Spring Boot 2.5.6 to Spring Boot 2.6.0, my Spring Web Flux reactive app fails to start due to my global error web exception handler.
Parameter 1 of constructor in io.trippay.platform.web.TripPayGlobalErrorWebExceptionHandler required a bean of type 'org.springframework.boot.autoconfigure.web.WebProperties$Resources' that could not be found.
I looked at the migration document and there are not clues to what changed or what should be done to mitigate this issue.
Thank you
The text was updated successfully, but these errors were encountered: