You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.
您好:
使用AutoTableBindPlugin在maven单元测试时,插件通过PathKit.getRootClassPath()默认识别的classpath是【project_root\target\test-classes\】目录,而这个目录下通常没有项目使用的model文件,因为只是针对测试生成的路径。
由于model文件通常都放置在【project_root\target\classes\】目录下,因此做了一下classpath指定:
String cp = PathKit.getRootClassPath();// target\test-classes
String path = rp.substring(0, cp.lastIndexOf("")).concat("\classes");
atbp.classpath(path);
指定后插件可以扫描到正确的classpath,但出现了另一个问题:获取到的全部class文件都少了一部分内容!即,原本名为foobar.model.demo的class被识别成了“r.model.demo”!
查看了下插件源码,发现open里面依然用了原来的classpath(ClassSearcher的83行):
String open = PathKit.getRootClassPath() + File.separator;
导致自定义的classpath被截断了。
麻烦作者确认下是否为bug?
或者说是classpath设定的使用方法不正确?
The text was updated successfully, but these errors were encountered: