SpringBootVFS这个类是干嘛用的?

请问SpringBootVFS是干嘛用的,今天偶然在配置多数据源是看到,希望有接触的朋友能讲解一下,谢谢了。

阅读 10.8k
2 个回答

楼上+1
mybatis xml里面的一些配置内容为包的解析(像typeAliases,mappers啊),基本就是这靠这玩意去读取文件了,整合到spring以后,就是ResourcePatternResolver去做扫描了,这就是springbootvfs的作用了

The VFS is used for searching classes (e.g. target class of type alias, type handler class) from an application (or application server). If you run a Spring Boot application using the executable jar, you need to use the SpringBootVFS. The auto-configuration feature provided by the MyBatis-Spring-Boot-Starter used it automatically, but it does not use automatically by a manual configuration (e.g. when uses multiple DataSource).

REF: http://mybatis.org/spring-boo...

VFS 是 VirtualFileSystem(虚拟文件系统)的缩写,从名字上你也应该能猜出来是干啥的。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题