-
Notifications
You must be signed in to change notification settings - Fork 88
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
bug in spring-boot because classloader #97
Comments
I create a project-example: https://github.com/marcosvpcortes/fixture-factory-spring-boot-error I'm using spring-boot-devtools. Without it the project will works... I think it is a minor error I will try create a fix.... The better way is not use the class to key of the template map? I could use the name of class? Thanks... |
Did you ever get this resolved? I had the same issue today but worked around it by providing my own implementation of FixtureFactory.loadTemplate(String packageName), using the Reflections library (https://github.com/ronmamo/reflections): `
` There is a bug in the getClassesForPackage utility method that the FixtureFactory uses to find the classes in a package, because of the nested jar files in a spring boot packaged jar. I'm not sure what the Reflections package does differently but it works OK. |
Hello @gregjones60 A can not solve the problem. Thanks by your solution. |
Hi,
I am use fixture-factory with spring-boot. I need create fixtures for fake some objects.
When I use Fixture.from(MyClass.class).gimme("valid"); the MyClass.class return a class from RestartClassLoader. But the fixture-factory load my fixture using other classloader (Launcher$AppClassLoader).
I think this generate two diff MyClass classes and my application fail to identify they in Map "template" inside of Fixture class.
There is something I can do to avoid this error?
Thanks.
The text was updated successfully, but these errors were encountered: