我只是试着复制PrimeFaces展示中关于条形码的样本。这是代码,我得到:

我只想测试它的效果和样品一样。
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:pm="http://primefaces.org/mobile"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<p:panelGrid columns="2">
<h:outputText value="Postnet" />
<p:barcode value="0123456789" type="postnet"/>
<h:outputText value="QR" />
<p:barcode value="0123456789" type="qr"/>
</p:panelGrid>
</h:body> 发布于 2014-10-30 02:15:03
您是否将barcode4j和qrgen库添加到依赖项中?
<dependency>
<groupId>net.glxn</groupId>
<artifactId>qrgen</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>net.sf.barcode4j</groupId>
<artifactId>barcode4j-light</artifactId>
<version>2.1</version>
</dependency>** maven中央存储库中不存在barcode4j2.1,因此maven用户需要手动安装
发布于 2014-11-27 10:19:35
您需要向存储库中添加一个jar文件,以便让primefaces更好地理解组件。你可以从这里拿到罐子,symbologies。那是“barcode4j 4j-light版本2.1”
https://stackoverflow.com/questions/26637599
复制相似问题