mybatis / spring-boot-starter

MyBatis integration with Spring Boot
Apache License 2.0
4.13k stars 1.79k forks source link

why SpringBootVFS not use Thread.currentThread().getContextClassLoader() as ClassLoader #542

Closed haibingzhao closed 1 year ago

haibingzhao commented 3 years ago

Mybatis VFS getResources use Thread.currentThread().getContextClassLoader() as ClassLoader, but mybatis-spring-boot-autoconfigure SpringBootVFS not, this will cause resources not found.

kazuki43zoo commented 3 years ago

@haibingzhao

Sorry for late reply. Thanks your reporting. Could you provide an actual conditions(environments) that cannot found or/and the small reproduce project?

PENGCHENGLIN007 commented 2 years ago

SpringBootVFSTest.zip 只要在测试程序中修改build就可以复现上述问题。 原始打包方式可以加载到com.pcl.test.typehandler.ArrayType2Handler 截图如下: 企业微信截图_16597042783304

新的打包方式无法加载type handler 截图如下: 企业微信截图_16597040501109