styleWithInlineFile() et al fail when the file is in a jar
ylexus opened this issue · comments
Alexey Yudichev commented
- InlineStaticResource should be reading from a URL via URL.openStream() rather than trying to convert it file (which will fail if the resource is in a jar). It's pretty standard in java to have resources in jar files or somewhere else, but not as files in filesystem, and it's easy to support it (in fact will be less code than there is now).
- The whole static resource loading API better be re-branded "file"->"resource" to underline it's classpath resources it's dealing with, not files.
David commented
If you can create a non-breaking PR (deprecate the old method), I would be happy to merge it.
David commented
Released as part of 1.2.1
<dependency>
<groupId>com.j2html</groupId>
<artifactId>j2html</artifactId>
<version>1.2.1</version>
</dependency>
http://search.maven.org/#artifactdetails%7Ccom.j2html%7Cj2html%7C1.2.1%7Cjar