Spring's custom org.springframework.core.NestedIOException is obsolete and can be replaced with standard IOException usage.

Comment From: jingxiang

Why not mark as Deprecated ? As far as I know, this class involves many downstream dependencies, and direct deletion may lead to the unavailability of many frameworks. For example:mybatis-spring-boot:2.2.2

Caused by: java.lang.NoClassDefFoundError: org/springframework/core/NestedIOException at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.sqlSessionFactory(MybatisAutoConfiguration.java:141) at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$fde06b8c.CGLIB$sqlSessionFactory$2(<generated>) at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$fde06b8c$$FastClassBySpringCGLIB$$8baa1e6e.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)

Comment From: snicoll

@jingxiang this is a good point, NestedIOException should have been marked as deprecated in 5.3.x. I've created #28929. If you're working on mybatis, please update the code to catch IOException directly. If you don't, can you please create an issue to notify them? Thanks!